From 319a773dfcb187bc7e87ae6d64df3b6b6ec4831a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Sep 2009 14:10:59 +0000 Subject: Stupid prepend. A prepend function was missing, and the prepend functions didn't hardcopy appropriately. --- src/fbasicstring.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/fbasicstring.h b/src/fbasicstring.h index e38e300..cda507a 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h @@ -919,6 +919,8 @@ namespace Bu { if( pData == NULL ) return; + + _hardCopy(); long nLen; for( nLen = 0; pData[nLen] != (chr)0; nLen++ ) { } @@ -939,9 +941,15 @@ namespace Bu cpy( pNew->pData, pData, nLen ); + _hardCopy(); core->prependChunk( pNew ); } + void prepend( const chr c ) + { + prepend( &c, 1 ); + } + /** * Insert pData before byte nPos, that is, the first byte of pData will * start at nPos. This could probably be made faster by avoiding -- cgit v1.2.3