diff --git a/src/framework/XMLBuffer.cpp b/src/framework/XMLBuffer.cpp index f3a2e14f12037dd1807a6c1882cd18b71421a3b1..e1aa080df0e8c49b3f424605491b06173a0c1e51 100644 --- a/src/framework/XMLBuffer.cpp +++ b/src/framework/XMLBuffer.cpp @@ -56,6 +56,10 @@ /** * $Log$ + * Revision 1.5 2000/08/17 00:04:50 andyh + * Fix error in growing of XMLBuffer from within ensureCapacity() + * Fixes crash pointed out by Simon Fell. + * * Revision 1.4 2000/05/15 22:31:11 andyh * Replace #include<memory.h> with <string.h> everywhere. * @@ -135,7 +139,7 @@ void XMLBuffer::insureCapacity(const unsigned int extraNeeded) return; // Oops, not enough room. Calc new capacity and allocate new buffer - const unsigned int newCap = (unsigned int)((fIndex + fCapacity) * 1.25); + const unsigned int newCap = (unsigned int)((fIndex + extraNeeded) * 1.25); XMLCh* newBuf = new XMLCh[newCap+1]; // Copy over the old stuff