From 42adbc69e4b4430886f9a28d282abfbc9bfd5d1c Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 2 May 2014 16:26:00 +0000 Subject: [PATCH] Core: Fixed String::Replace(String(), ..) issue git-svn-id: svn://ultimatepp.org/upp/trunk@7346 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/AString.hpp | 2 ++ uppsrc/CtrlCore/init | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/uppsrc/Core/AString.hpp b/uppsrc/Core/AString.hpp index f1f096a5c..2d1def11c 100644 --- a/uppsrc/Core/AString.hpp +++ b/uppsrc/Core/AString.hpp @@ -94,6 +94,8 @@ int AString::ReverseFind(int len, const tchar *s, int from) const template void AString::Replace(const tchar *find, int findlen, const tchar *replace, int replacelen) { + if(findlen == 0) + return; String r; int i = 0; const tchar *p = B::Begin(); diff --git a/uppsrc/CtrlCore/init b/uppsrc/CtrlCore/init index aa63470cf..27c33a181 100644 --- a/uppsrc/CtrlCore/init +++ b/uppsrc/CtrlCore/init @@ -3,7 +3,7 @@ #include "Draw/init" #include "plugin\bmp/init" #include "RichText/init" -#define BLITZ_INDEX__ F656a4ea94e4f808b1ec63034b0e6c5ac +#define BLITZ_INDEX__ Fe2ff541f9bb9f4ad3f5bcc23a34e1b73 #include "CtrlCore.icpp" #undef BLITZ_INDEX__ #endif