aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2006-12-17 19:41:41 +0000
committerWillem Jan Palenstijn2006-12-17 19:41:41 +0000
commit9543231685d1ffb459fbc70e4679c4ac459abbd8 (patch)
tree4bc6d5911959820bc39ed520eac86f29a1be8954 /common
parentd39da605a23a9ec54caf4ae56ad212e7d4c915e1 (diff)
downloadscummvm-rg350-9543231685d1ffb459fbc70e4679c4ac459abbd8.tar.gz
scummvm-rg350-9543231685d1ffb459fbc70e4679c4ac459abbd8.tar.bz2
scummvm-rg350-9543231685d1ffb459fbc70e4679c4ac459abbd8.zip
replace ensureCapacity(_len-1) by ensureCapacity(_len) (fixes bug #1617410)
svn-id: r24865
Diffstat (limited to 'common')
-rw-r--r--common/str.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/str.cpp b/common/str.cpp
index bea7056991..ad2367fb41 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -223,7 +223,7 @@ void String::deleteChar(uint32 p) {
// Call ensureCapacity to make sure we actually *own* the storage
// to which _str points to -- we wouldn't want to modify a storage
// which other string objects are sharing, after all.
- ensureCapacity(_len - 1, true);
+ ensureCapacity(_len, true);
while (p++ < _len)
_str[p-1] = _str[p];
_len--;