1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Apply review.

This commit is contained in:
SFENCE 2025-06-09 19:09:16 +02:00
parent 1df282c635
commit 0b423bdb22
7 changed files with 19 additions and 21 deletions

View file

@ -444,7 +444,9 @@ void ScriptApiBase::addObjectReference(ServerActiveObject *cobj)
objectstable = lua_gettop(L);
// objects_by_guid[guid] = object
lua_pushstring(L, cobj->getGUID().c_str());
auto guid = cobj->getGUID();
assert(!guid.empty());
lua_pushstring(L, guid.c_str());
lua_pushvalue(L, object);
lua_settable(L, objectstable);
}