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
This commit is contained in:
Monster Iestyn 2017-07-02 16:50:11 +01:00
parent 1111282908
commit c751971d57

View file

@ -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: