From 740f868333785354f0e40a8300cbd1b81e4e97dc Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Sat, 7 Aug 2004 20:23:10 +0000 Subject: [PATCH] Make sure that we're not setting the string size to -1. CCMAIL:ismail donmez git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336760 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- toolkit/tstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/tstring.cpp b/toolkit/tstring.cpp index fe0588d3..c6b89218 100644 --- a/toolkit/tstring.cpp +++ b/toolkit/tstring.cpp @@ -677,7 +677,7 @@ void String::prepare(Type t) debug("String::prepare() - Unicode conversion error."); - int newSize = target - targetBuffer - 1; + int newSize = target != targetBuffer ? target - targetBuffer - 1 : 0; d->data.resize(newSize); for(int i = 0; i < newSize; i++)