X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/510bb7480c5138dd5127ed3d8b1d9cbab39983c9..dc9abdf656740a2e433ecefb6ac6a090455e60c3:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index b4857f3b57..2d608d1eb8 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -742,11 +742,8 @@ wxStringBase& wxStringBase::replace(size_t nStart, size_t nLen, // //Also, we can't use append with the full character pointer and must //do it manually because this string can contain null characters - if ( nStart != 0 ) - { - for(size_t i1 = 0; i1 < nStart; ++i1) - strTmp.append(1, this->c_str()[i1]); - } + for(size_t i1 = 0; i1 < nStart; ++i1) + strTmp.append(1, this->c_str()[i1]); //its safe to do the full version here because //sz must be a normal c string