Fix non-void function path without return

This commit is contained in:
David Capello 2025-08-27 12:22:01 -03:00
parent 9c5ca6bcc6
commit 8e07617a9d
1 changed files with 6 additions and 8 deletions

View File

@ -99,16 +99,14 @@ private:
lua_rawgeti(L, LUA_REGISTRYINDEX, ref); lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
if (lua_pcall(L, 0, 1, 0)) { if (lua_pcall(L, 0, 1, 0)) {
if (const char* s = lua_tostring(L, -1)) { if (const char* s = lua_tostring(L, -1))
Console().printf("Error: %s", s); Console().printf("Error: %s", s);
return false; return false;
}
}
else {
bool ret = lua_toboolean(L, -1);
lua_pop(L, 1);
return ret;
} }
bool ret = lua_toboolean(L, -1);
lua_pop(L, 1);
return ret;
} }
std::string m_title; std::string m_title;