diff options
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 |
