From 7613fa037523ea83a0add6135dee4cf7a30b6fde Mon Sep 17 00:00:00 2001 From: Ben Payne Date: Tue, 20 Jan 2015 17:55:00 -0500 Subject: [PATCH] Remove unnecessary null termination UTF16Cache::copyToBuffer() is already adding a null terminator --- Engine/source/core/strings/unicode.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Engine/source/core/strings/unicode.cpp b/Engine/source/core/strings/unicode.cpp index ffc650fae..d43959485 100644 --- a/Engine/source/core/strings/unicode.cpp +++ b/Engine/source/core/strings/unicode.cpp @@ -159,7 +159,6 @@ U32 convertUTF8toUTF16N(const UTF8 *unistring, UTF16 *outbuffer, U32 len) { const UTF16Cache &cache = (*cacheItr).value; cache.copyToBuffer(outbuffer, len); - outbuffer[len-1] = '\0'; return getMin(cache.mLength,len - 1); } #endif