Fix a bug with fribidi
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5567 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2275ecaa2b
commit
be70408b38
@ -181,7 +181,8 @@ const wchar_t* Translations::w_gettext(const char* original)
|
||||
|
||||
|
||||
#if ENABLE_BIDI
|
||||
|
||||
if(this->isRTLLanguage())
|
||||
{
|
||||
const int FRIBIDI_BUFFER_SIZE = 512;
|
||||
FriBidiChar fribidiInput[FRIBIDI_BUFFER_SIZE];
|
||||
|
||||
@ -196,7 +197,7 @@ const wchar_t* Translations::w_gettext(const char* original)
|
||||
|
||||
if (n == FRIBIDI_BUFFER_SIZE-1) // prevent buffeoverflows
|
||||
{
|
||||
std::cerr << "WARNING : translated stirng too long, truncating!\n";
|
||||
std::cerr << "WARNING : translated string too long, truncating!\n";
|
||||
fribidiInput[n] = 0;
|
||||
break;
|
||||
}
|
||||
@ -231,8 +232,7 @@ const wchar_t* Translations::w_gettext(const char* original)
|
||||
|
||||
|
||||
return (const wchar_t*)fribidiOutput;
|
||||
|
||||
#else
|
||||
}
|
||||
|
||||
return out_ptr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user