1
0
forked from mirrors/0ad

Fix Unicode in JS print() on Linux

This was SVN commit r14129.
This commit is contained in:
Ykkrosh
2013-11-10 16:13:40 +00:00
parent c27c663697
commit d178f32698
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -316,10 +316,10 @@ JSBool print(JSContext* cx, uintN argc, jsval* vp)
{
for (uintN i = 0; i < argc; ++i)
{
std::string str;
std::wstring str;
if (!ScriptInterface::FromJSVal(cx, JS_ARGV(cx, vp)[i], str))
return JS_FALSE;
debug_printf(L"%hs", str.c_str());
debug_printf(L"%ls", str.c_str());
}
fflush(stdout);
JS_SET_RVAL(cx, vp, JSVAL_VOID);