diff options
Diffstat (limited to 'Utilities/cmexpat/xmlparse.c')
-rw-r--r-- | Utilities/cmexpat/xmlparse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Utilities/cmexpat/xmlparse.c b/Utilities/cmexpat/xmlparse.c index 0c84f22..29ea3d3 100644 --- a/Utilities/cmexpat/xmlparse.c +++ b/Utilities/cmexpat/xmlparse.c @@ -1185,14 +1185,14 @@ void *XML_GetBuffer(XML_Parser parser, int len) bufferLim = newBuf + bufferSize; #ifdef XML_CONTEXT_BYTES if (bufferPtr) { - int keep = bufferPtr - buffer; - if (keep > XML_CONTEXT_BYTES) - keep = XML_CONTEXT_BYTES; - memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep); + int xmKeep = bufferPtr - buffer; + if (xmKeep > XML_CONTEXT_BYTES) + xmKeep = XML_CONTEXT_BYTES; + memcpy(newBuf, &bufferPtr[-xmKeep], bufferEnd - bufferPtr + xmKeep); FREE(buffer); buffer = newBuf; - bufferEnd = buffer + (bufferEnd - bufferPtr) + keep; - bufferPtr = buffer + keep; + bufferEnd = buffer + (bufferEnd - bufferPtr) + xmKeep; + bufferPtr = buffer + xmKeep; } else { bufferEnd = newBuf + (bufferEnd - bufferPtr); |