Fix table checks

This commit is contained in:
Desone Burns II 2020-12-03 16:42:57 -07:00
parent 0e10b94d38
commit 9ae9a1f6d7

View File

@ -943,7 +943,7 @@ Sol2ScriptingEnvironment::GetStringListFromTable(const std::string &table_name)
auto &context = GetSol2Context();
BOOST_ASSERT(context.state.lua_state() != nullptr);
std::vector<std::string> strings;
if (context.profile_table[table_name])
if (!context.profile_table[table_name])
{
return strings;
}
@ -965,7 +965,7 @@ Sol2ScriptingEnvironment::GetStringListsFromTable(const std::string &table_name)
auto &context = GetSol2Context();
BOOST_ASSERT(context.state.lua_state() != nullptr);
if (context.profile_table[table_name] == nullptr)
if (!context.profile_table[table_name])
{
return string_lists;
}