From 1b05969d44500b607e428f48c840fc96180cb72c Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Mon, 6 Aug 2012 10:28:55 +0000 Subject: [PATCH] - Fixed: FString would truncate a string if Insert was called on a string which has a reference count greater than 1. SVN r3809 (trunk) --- src/zstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zstring.cpp b/src/zstring.cpp index d126d607b..7cc594b14 100644 --- a/src/zstring.cpp +++ b/src/zstring.cpp @@ -773,7 +773,7 @@ void FString::Insert (size_t index, const char *instr, size_t instrlen) AllocBuffer (mylen + instrlen); StrCopy (Chars, old->Chars(), index); StrCopy (Chars + index, instr, instrlen); - StrCopy (Chars + index + instrlen, Chars + index, mylen - index + 1); + StrCopy (Chars + index + instrlen, old->Chars() + index, mylen - index + 1); old->Release(); } }