dbertoni 00/12/20 20:04:38
Modified: c/src/PlatformSupport XalanOutputStream.cpp
Log:
Reserve an extra space for the terminating byte.
Revision Changes Path
1.6 +3 -2 xml-xalan/c/src/PlatformSupport/XalanOutputStream.cpp
Index: XalanOutputStream.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanOutputStream.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XalanOutputStream.cpp 2000/12/01 22:00:19 1.5
+++ XalanOutputStream.cpp 2000/12/21 04:04:38 1.6
@@ -79,6 +79,7 @@
m_writeAsUTF16(false),
m_transcodingBuffer()
{
+ m_buffer.reserve(theBufferSize + 1);
}
@@ -460,7 +461,7 @@
if (m_buffer.size() < m_bufferSize)
{
// Enlarge the buffer...
- m_buffer.reserve(theBufferSize);
+ m_buffer.reserve(theBufferSize + 1);
}
else if (m_buffer.size() > m_bufferSize)
{
@@ -470,7 +471,7 @@
// the correct size.
BufferType temp;
- temp.reserve(theBufferSize);
+ temp.reserve(theBufferSize + 1);
// Swap temp with m_buffer so that
// m_buffer is now the correct size.