summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-04-27 19:28:42 +0300
committerYuri Chebotarev <ychebotarev@productengine.com>2010-04-27 19:28:42 +0300
commit3d13402419ecb883731d1bd7b4a8b966a1c7649b (patch)
treed7cd8c9c47a6246cc14e52301726ae857f154219 /indra
parent62214e082f8ba47f1224353422a4606c5c01b14f (diff)
fix EXT-4858 "Detecting Hardware..." not showing correctly in non-English languages with Viewer 2.0
reviewed Vadim Savchuk https://codereview.productengine.com/secondlife/r/317/ --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindowwin32.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index e2da3d1ad8..a96ad7e796 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2877,8 +2877,13 @@ void LLSplashScreenWin32::updateImpl(const std::string& mesg)
{
if (!mWindow) return;
+ int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), mesg.length(), NULL, 0);
+ if( output_str_len>1024 )
+ return;
+
WCHAR w_mesg[1024];
- mbstowcs(w_mesg, mesg.c_str(), 1024);
+
+ MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), mesg.length(), w_mesg, output_str_len);
SendDlgItemMessage(mWindow,
666, // HACK: text id