diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-09-21 14:10:59 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-09-21 14:10:59 +0000 |
commit | 319a773dfcb187bc7e87ae6d64df3b6b6ec4831a (patch) | |
tree | d14a516b90ef31d92802d025229771ac6f8d2c13 /src/fbasicstring.h | |
parent | de3f8f4f6eab5d5c873c91cc93a01fe2e8a82363 (diff) | |
download | libbu++-319a773dfcb187bc7e87ae6d64df3b6b6ec4831a.tar.gz libbu++-319a773dfcb187bc7e87ae6d64df3b6b6ec4831a.tar.bz2 libbu++-319a773dfcb187bc7e87ae6d64df3b6b6ec4831a.tar.xz libbu++-319a773dfcb187bc7e87ae6d64df3b6b6ec4831a.zip |
Stupid prepend. A prepend function was missing, and the prepend functions
didn't hardcopy appropriately.
Diffstat (limited to '')
-rw-r--r-- | src/fbasicstring.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 | |||
919 | { | 919 | { |
920 | if( pData == NULL ) | 920 | if( pData == NULL ) |
921 | return; | 921 | return; |
922 | |||
923 | _hardCopy(); | ||
922 | long nLen; | 924 | long nLen; |
923 | for( nLen = 0; pData[nLen] != (chr)0; nLen++ ) { } | 925 | for( nLen = 0; pData[nLen] != (chr)0; nLen++ ) { } |
924 | 926 | ||
@@ -939,9 +941,15 @@ namespace Bu | |||
939 | 941 | ||
940 | cpy( pNew->pData, pData, nLen ); | 942 | cpy( pNew->pData, pData, nLen ); |
941 | 943 | ||
944 | _hardCopy(); | ||
942 | core->prependChunk( pNew ); | 945 | core->prependChunk( pNew ); |
943 | } | 946 | } |
944 | 947 | ||
948 | void prepend( const chr c ) | ||
949 | { | ||
950 | prepend( &c, 1 ); | ||
951 | } | ||
952 | |||
945 | /** | 953 | /** |
946 | * Insert pData before byte nPos, that is, the first byte of pData will | 954 | * Insert pData before byte nPos, that is, the first byte of pData will |
947 | * start at nPos. This could probably be made faster by avoiding | 955 | * start at nPos. This could probably be made faster by avoiding |