Attempt to fix a lua panic when unarchiveing extvars (print error to console instead. Not sure if it would be safe for game to read from save afterwards though)
This commit is contained in:
1 parent
23b36b5074
commit
55248e7fcf
1 file changed
+7
-1
+7
-1
@@ -1460,7 +1460,13 @@ static void UnArchiveExtVars(void *pointer)
|
||||
for (i = 0; i < field_count; i++)
|
||||
{
|
||||
READSTRING(save_p, field);
|
||||
UnArchiveValue(TABLESINDEX);
|
||||
|
||||
if (UnArchiveValue(TABLESINDEX) == 1)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Unexpected end marker when reading ExtVars (field '%s')\n", field);
|
||||
break;
|
||||
}
|
||||
|
||||
lua_setfield(gL, -2, field);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user