Script: Additional change to f8c3867 for print()

This commit is contained in:
Birunthan Mohanathas 2013-08-06 22:06:21 +03:00
parent bbb101cbd5
commit d0466c5588
2 changed files with 4 additions and 1 deletions

View File

@ -34,6 +34,8 @@ public:
static lua_State* GetState(bool unicode) { c_UnicodeState = unicode; return c_State; }
static bool IsUnicodeState() { return c_UnicodeState; }
static void ReportErrors(const std::wstring& file);
static void PushWide(const WCHAR* str);

View File

@ -54,7 +54,8 @@ static int Print(lua_State* L)
lua_pop(L, 1);
}
LogDebug(StringUtil::Widen(message).c_str());
LogDebug(LuaManager::IsUnicodeState() ?
StringUtil::WidenUTF8(message).c_str() : StringUtil::Widen(message).c_str());
return 0;
}