From 9543231685d1ffb459fbc70e4679c4ac459abbd8 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 17 Dec 2006 19:41:41 +0000 Subject: [PATCH] replace ensureCapacity(_len-1) by ensureCapacity(_len) (fixes bug #1617410) svn-id: r24865 --- common/str.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/str.cpp b/common/str.cpp index bea70569913..ad2367fb416 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--;