Fix TEST_BIDI option

This commit is contained in:
Flakebi 2015-04-25 16:01:50 +02:00
parent f97db81ce3
commit 6e0b96c21f

View File

@ -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;