aboutsummaryrefslogtreecommitdiff
path: root/src/stable/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stable/string.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/stable/string.cpp b/src/stable/string.cpp
index 1579826..ce679fe 100644
--- a/src/stable/string.cpp
+++ b/src/stable/string.cpp
@@ -201,7 +201,7 @@ void Bu::String::append( const char *pData, long nStart, long nLen )
201 201
202 _hardCopy(); 202 _hardCopy();
203 203
204 if( core->pLast && core->pLast->nLength < nMinSize ) 204 if( core->pLast && core->pLast->nLength+1 < nMinSize )
205 { 205 {
206 int nAmnt = nMinSize - core->pLast->nLength; 206 int nAmnt = nMinSize - core->pLast->nLength;
207 if( nAmnt > nLen ) 207 if( nAmnt > nLen )
@@ -228,9 +228,9 @@ void Bu::String::append( const char *pData, long nStart, long nLen )
228 228
229void Bu::String::append( const char &cData ) 229void Bu::String::append( const char &cData )
230{ 230{
231 if( core->pLast && core->pLast->nLength < nMinSize ) 231 _hardCopy();
232 if( core->pLast && core->pLast->nLength+1 < nMinSize )
232 { 233 {
233 _hardCopy();
234 core->pLast->pData[core->pLast->nLength] = cData; 234 core->pLast->pData[core->pLast->nLength] = cData;
235 ++core->pLast->nLength; ++core->nLength; 235 ++core->pLast->nLength; ++core->nLength;
236// pLast->pData[pLast->nLength] = (char)0; 236// pLast->pData[pLast->nLength] = (char)0;
@@ -615,9 +615,9 @@ Bu::String &Bu::String::operator+=( const Bu::String::const_iterator &i )
615 615
616Bu::String &Bu::String::operator+=( const char cData ) 616Bu::String &Bu::String::operator+=( const char cData )
617{ 617{
618 if( core->pLast && core->pLast->nLength < nMinSize )
619 {
620 _hardCopy(); 618 _hardCopy();
619 if( core->pLast && core->pLast->nLength+1 < nMinSize )
620 {
621 core->pLast->pData[core->pLast->nLength] = cData; 621 core->pLast->pData[core->pLast->nLength] = cData;
622 ++core->pLast->nLength; ++core->nLength; 622 ++core->pLast->nLength; ++core->nLength;
623// pLast->pData[pLast->nLength] = (char)0; 623// pLast->pData[pLast->nLength] = (char)0;