Show a console error if the gamestate contains too many tables

This commit is contained in:
Louis-Antoine 2020-11-08 17:33:49 +01:00
parent e52cb7f6fa
commit 87206a8c21

View file

@ -980,8 +980,17 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
lua_pop(gL, 1);
}
if (!found)
{
t++;
if (t == 0)
{
CONS_Alert(CONS_ERROR, "Too many tables to archive!\n");
WRITEUINT8(save_p, ARCH_NULL);
return 0;
}
}
WRITEUINT8(save_p, ARCH_TABLE);
WRITEUINT16(save_p, t);