Skip to content
Snippets Groups Projects
Commit c751971d authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Fix integer type slipup in ArchiveValue for saving mobjinfo/state #s that LJSonic spotted

Apart from the fact that UnArchiveValue reads UINT16 for both anyway (which alone causes problems), but UINT8 isn't even enough to store the higher end of the object types list and definitely most of the states welp
parent 11112829
No related branches found
No related tags found
3 merge requests!252OpenGL: Public flatsprite: The Fixening,!203Fixes for Each Time and P_IsObjectOnGroundIn,!200Lua archive value fix
......@@ -566,14 +566,14 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
{
mobjinfo_t *info = *((mobjinfo_t **)lua_touserdata(gL, myindex));
WRITEUINT8(save_p, ARCH_MOBJINFO);
WRITEUINT8(save_p, info - mobjinfo);
WRITEUINT16(save_p, info - mobjinfo);
break;
}
case ARCH_STATE:
{
state_t *state = *((state_t **)lua_touserdata(gL, myindex));
WRITEUINT8(save_p, ARCH_STATE);
WRITEUINT8(save_p, state - states);
WRITEUINT16(save_p, state - states);
break;
}
case ARCH_MOBJ:
......
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