summaryrefslogtreecommitdiff
path: root/src/stable/string.cpp
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2018-01-29 00:47:50 -0800
committerMike Buland <mbuland@penny-arcade.com>2018-01-29 00:47:50 -0800
commit1cb0fc6ab3f05e37f8c4c0bf5549b320c8b89078 (patch)
tree1417fdcc919d74ca25dc33b27714d10dd169700e /src/stable/string.cpp
parent65ffc3b58ca865a7f83bf39290df1760c35b57f0 (diff)
downloadlibbu++-1cb0fc6ab3f05e37f8c4c0bf5549b320c8b89078.tar.gz
libbu++-1cb0fc6ab3f05e37f8c4c0bf5549b320c8b89078.tar.bz2
libbu++-1cb0fc6ab3f05e37f8c4c0bf5549b320c8b89078.tar.xz
libbu++-1cb0fc6ab3f05e37f8c4c0bf5549b320c8b89078.zip
Changes related to debugging an issue.
It may not have had as much to do with low-level protocol details, and a lot of this can be reverted, but I can't revert it right now. I'll look it over later in the week.
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;