From 6e0b96c21f3b2382ba64429671d7b759598cca3d Mon Sep 17 00:00:00 2001 From: Flakebi Date: Sat, 25 Apr 2015 16:01:50 +0200 Subject: [PATCH] Fix TEST_BIDI option --- src/utils/translation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/translation.cpp b/src/utils/translation.cpp index 6197baaf9..c3b8655f6 100644 --- a/src/utils/translation.cpp +++ b/src/utils/translation.cpp @@ -147,9 +147,10 @@ FriBidiChar* toFribidiChar(const wchar_t* str) // Prepend a character that forces RTL style FriBidiChar *tmp = result; result = new FriBidiChar[++length + 1]; - std::memcpy(result + 1, tmp, length * sizeof(FriBidiChar)); + memcpy(result + 1, tmp, length * sizeof(FriBidiChar)); result[0] = L'\u202E'; - freeFribidiChar(tmp); + if (sizeof(wchar_t) != sizeof(FriBidiChar)) + delete[] tmp; #endif return result;