diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-27 20:11:07 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-27 20:11:07 +0000 |
commit | dd802db0d3cb38f4590d15aebaa301eb4608157c (patch) | |
tree | ab9006370594f3357cca2aeaca4418f53189a99f /src/modules | |
parent | eefe0a2e6705204b0fdbb0bc5b798d9f4e6b67b1 (diff) |
Minor bugfixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/xml/xmlParser.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp index 21cf0a0548..069cec6678 100644 --- a/src/modules/xml/xmlParser.cpp +++ b/src/modules/xml/xmlParser.cpp @@ -1305,7 +1305,8 @@ char XMLNode::maybeAddTxT(void *pa, XMLCSTR tokenPStr) { // if the previous insertion was a comment (<!-- -->) AND // if the previous previous insertion was a text then, delete the comment and append the text - int n = d->nChild+d->nText+d->nClear-1, *o = d->pOrder; + size_t n = d->nChild+d->nText+d->nClear-1; + int *o = d->pOrder; if (((o[n]&3) == eNodeClear)&&((o[n-1]&3) == eNodeText)) { int i = o[n]>>2; @@ -1314,7 +1315,7 @@ char XMLNode::maybeAddTxT(void *pa, XMLCSTR tokenPStr) deleteClear(i); i = o[n-1]>>2; n = xstrlen(d->pText[i]); - int n2 = xstrlen(lpt)+1; + size_t n2 = xstrlen(lpt)+1; d->pText[i] = (XMLSTR)realloc((void*)d->pText[i], (n+n2)*sizeof(XMLCHAR)); if (!d->pText[i]) return 1; memcpy((void*)(d->pText[i]+n), lpt, n2*sizeof(XMLCHAR)); @@ -2706,8 +2707,8 @@ XMLCSTR XMLNode::getInnerText() const if (d->pInnerText) return d->pInnerText; int count = nElement(); - int i, length = 1; - for (i=0; i < count; i++) + size_t length = 1; + for (int i=0; i < count; i++) { XMLNodeContents c = enumContents(i); switch (c.etype) @@ -2722,7 +2723,7 @@ XMLCSTR XMLNode::getInnerText() const } XMLCHAR *buf = (XMLCHAR *)malloc(sizeof(XMLCHAR) * length); XMLCHAR *pos = buf; - for (i=0; i < count; i++) + for (int i=0; i < count; i++) { XMLNodeContents c = enumContents(i); switch (c.etype) |