Changeset 989 for cpp/frams/util/sstring-simple.cpp
- Timestamp:
- 07/09/20 00:21:37 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring-simple.cpp
r973 r989 76 76 { 77 77 if (newlength < 0) newlength = strlen(txt); 78 else txt[newlength] = 0; 78 else 79 { 80 if (newlength >= allocated) 81 { 82 assert(newlength < allocated); 83 if (allocated == 0) return; 84 newlength = allocated - 1; 85 } 86 txt[newlength] = 0; 87 } 79 88 used = newlength; 80 assert(used < allocated);81 89 } 82 90 83 91 void SString::endAppend(int newappend) 84 92 { 85 if (newappend < 0) newappend = strlen(txt + appending); 86 else txt[appending + newappend] = 0; 87 used = appending + newappend; 88 assert(used < allocated); 93 if (newappend < 0) endWrite(appending + strlen(txt + appending)); 94 else endWrite(newappend + appending); 89 95 } 90 96
Note: See TracChangeset
for help on using the changeset viewer.