Fix issue related to Lua script load

This commit is contained in:
Felipe Zimmerle
2017-12-13 16:20:18 -03:00
parent c98e665475
commit eaa4770c5d
3 changed files with 8 additions and 6 deletions

View File

@@ -75,7 +75,7 @@ bool Lua::load(std::string script, std::string *err) {
const char *luaerr = lua_tostring(L, -1);
err->assign("Failed to compile script '" + script + "");
if (luaerr) {
err->append(": " + *luaerr);
err->append(": " + std::string(luaerr));
}
err->append(".");
lua_close(L);
@@ -91,7 +91,7 @@ bool Lua::load(std::string script, std::string *err) {
const char *luaerr = lua_tostring(L, -1);
err->assign("Failed to compile script '" + script + "");
if (luaerr) {
err->append(": " + *luaerr);
err->append(": " + std::string(luaerr));
}
err->append(".");
lua_close(L);
@@ -366,6 +366,8 @@ int Lua::setvar(lua_State *L) {
t->m_collections.storeOrUpdateFirst(collection,
variableName, var_value);
return 0;
}