[Cppunit-cvs] cppunit2/include/cpptl conststring.h,1.3,1.4
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-02-27 17:12:40
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21318/include/cpptl Modified Files: conststring.h Log Message: * fixed bug in StringBufer::truncate() (length was not set) * in constructor, ending zero is set before filling the buffer (nicer for debugging) Index: conststring.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/conststring.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** conststring.h 27 Feb 2005 15:26:27 -0000 1.3 --- conststring.h 27 Feb 2005 17:12:17 -0000 1.4 *************** *** 590,595 **** , buffer_( new value_type[length_+1] ) { - concatenator.copyToBuffer( buffer_ ); buffer_[length_] = 0; } --- 590,595 ---- , buffer_( new value_type[length_+1] ) { buffer_[length_] = 0; + concatenator.copyToBuffer( buffer_ ); } *************** *** 600,605 **** , buffer_( new value_type[length_+1] ) { - memcpy( buffer_, buffer.c_str(), length_ ); buffer_[length_] = 0; } --- 600,605 ---- , buffer_( new value_type[length_+1] ) { buffer_[length_] = 0; + memcpy( buffer_, buffer.c_str(), length_ ); } *************** *** 611,616 **** , buffer_( new value_type[length_+1] ) { - memcpy( buffer_, string.c_str(), length_ ); buffer_[length_] = 0; } # endif --- 611,616 ---- , buffer_( new value_type[length_+1] ) { buffer_[length_] = 0; + memcpy( buffer_, string.c_str(), length_ ); } # endif *************** *** 968,971 **** --- 968,972 ---- { buffer_[length] = 0; + length_ = length; } |