Skip to content
Snippets Groups Projects
Unverified Commit 2ad4e1a1 authored by Monster Iestyn's avatar Monster Iestyn Committed by GitHub
Browse files

Merge pull request #219 from LJSonik/net-archive-fix

Fix missing lua_pop in ArchiveExtVars
parents b63bd97b 4ea5d2df
No related branches found
No related tags found
1 merge request!252OpenGL: Public flatsprite: The Fixening
......@@ -715,8 +715,15 @@ static void ArchiveExtVars(void *pointer, const char *ptype)
for (i = 0; lua_next(gL, -2); i++)
lua_pop(gL, 1);
if (i == 0 && !fastcmp(ptype,"player")) // skip anything that has an empty table and isn't a player.
// skip anything that has an empty table and isn't a player.
if (i == 0)
{
if (fastcmp(ptype,"player")) // always include players even if they have no extra variables
WRITEUINT16(save_p, 0);
lua_pop(gL, 1);
return;
}
if (fastcmp(ptype,"mobj")) // mobjs must write their mobjnum as a header
WRITEUINT32(save_p, ((mobj_t *)pointer)->mobjnum);
WRITEUINT16(save_p, i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment