From 1cb0fc6ab3f05e37f8c4c0bf5549b320c8b89078 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 29 Jan 2018 00:47:50 -0800 Subject: 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. --- src/stable/string.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/stable/string.cpp') 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 ) _hardCopy(); - if( core->pLast && core->pLast->nLength < nMinSize ) + if( core->pLast && core->pLast->nLength+1 < nMinSize ) { int nAmnt = nMinSize - core->pLast->nLength; if( nAmnt > nLen ) @@ -228,9 +228,9 @@ void Bu::String::append( const char *pData, long nStart, long nLen ) void Bu::String::append( const char &cData ) { - if( core->pLast && core->pLast->nLength < nMinSize ) + _hardCopy(); + if( core->pLast && core->pLast->nLength+1 < nMinSize ) { - _hardCopy(); core->pLast->pData[core->pLast->nLength] = cData; ++core->pLast->nLength; ++core->nLength; // pLast->pData[pLast->nLength] = (char)0; @@ -615,9 +615,9 @@ Bu::String &Bu::String::operator+=( const Bu::String::const_iterator &i ) Bu::String &Bu::String::operator+=( const char cData ) { - if( core->pLast && core->pLast->nLength < nMinSize ) - { _hardCopy(); + if( core->pLast && core->pLast->nLength+1 < nMinSize ) + { core->pLast->pData[core->pLast->nLength] = cData; ++core->pLast->nLength; ++core->nLength; // pLast->pData[pLast->nLength] = (char)0; -- cgit v1.2.3