Fixed a stupid bug in BString::CharacterEscape() and committed the correct version of DataIO.cpp (the former was an incorrect version)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1429 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2002-10-07 12:51:25 +00:00
parent fde69fce63
commit 979b68a75b
2 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -1099,7 +1099,7 @@ BString::CharacterEscape(const char *original, const char *setOfCharsToEscape, c
for(;;) {
pos = strcspn(_privateData + offset, setOfCharsToEscape);
offset += pos;
if (offset > Length())
if (offset >= Length())
break;
_OpenAtBy(offset, 1);
memset(_privateData + offset, escapeWith, 1);
@@ -1121,7 +1121,7 @@ BString::CharacterEscape(const char *setOfCharsToEscape, char escapeWith)
for(;;) {
pos = strcspn(_privateData + offset, setOfCharsToEscape);
offset += pos;
if (offset > Length())
if (offset >= Length())
break;
_OpenAtBy(offset, 1);
memset(_privateData + offset, escapeWith, 1);