replace ensureCapacity(_len-1) by ensureCapacity(_len) (fixes bug #1617410)

svn-id: r24865
This commit is contained in:
Willem Jan Palenstijn 2006-12-17 19:41:41 +00:00
parent d39da605a2
commit 9543231685

View File

@ -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--;