This commit is contained in:
Birunthan Mohanathas
2013-01-27 12:14:37 +02:00
parent 654599d192
commit fdcd5a9757
12 changed files with 134 additions and 88 deletions

View File

@ -206,8 +206,9 @@ int LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, std
}
else if (type == LUA_TSTRING)
{
const char* str = lua_tostring(L, -1);
strValue = ConvertToWide(str);
size_t strLen = 0;
const char* str = lua_tolstring(L, -1, &strLen);
strValue = StringUtil::Widen(str, (int)strLen);
numValue = strtod(str, NULL);
}