diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 11f797cc3..ffeb8f328 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2643,7 +2643,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic // Call it only once by tic if (*oldtic != I_GetTime()) { - INT32 key; I_OsPolling(); diff --git a/src/lua_script.c b/src/lua_script.c index 7440b0731..9a1ce06a3 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -718,8 +718,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);