fix luatable in GetPlayerIdentifiers

This commit is contained in:
Lion Kortlepel committed 2021-09-09 12:12:54 +03:00
1 parent a0a7b8ecce
commit 95188042c5
1 file changed
+4 -3
+4 -3
View File
@@ -375,12 +375,13 @@ int lua_GetIdentifiers(lua_State* L) {
auto IDs = MaybeClient.value().lock()->GetIdentifiers();
if (IDs.empty())
return 0;
lua_newtable(L);
LuaTable::Begin(L);
for (const std::string& ID : IDs) {
lua_pushstring(L, ID.substr(0, ID.find(':')).c_str());
LuaTable::BeginEntry(L, ID.substr(0, ID.find(':')).c_str());
lua_pushstring(L, ID.c_str());
lua_settable(L, -3);
LuaTable::EndEntry(L);
}
// LuaTable::End(L, "");
} else
return 0;
} else {