From 9190ee213922a19b55b01747ba85c1d6a7e9ea86 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 5 Jul 2009 03:15:35 +0000 Subject: [PATCH] Fixes a crash when loading a savegame w/ saved map states in it after restarting EDuke32 git-svn-id: https://svn.eduke32.com/eduke32@1451 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamevars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 8f9407bc5..88f7281f1 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -179,13 +179,13 @@ int32_t Gv_ReadSave(int32_t fil) if (aGameVars[j].dwFlags & GAMEVAR_NORESET) continue; if (aGameVars[j].dwFlags & GAMEVAR_PERPLAYER) { - if (!MapInfo[i].savedstate->vars[j]) +// if (!MapInfo[i].savedstate->vars[j]) MapInfo[i].savedstate->vars[j] = Bcalloc(MAXPLAYERS,sizeof(intptr_t)); if (kdfread(&MapInfo[i].savedstate->vars[j][0],sizeof(intptr_t) * MAXPLAYERS, 1, fil) != 1) goto corrupt; } else if (aGameVars[j].dwFlags & GAMEVAR_PERACTOR) { - if (!MapInfo[i].savedstate->vars[j]) +// if (!MapInfo[i].savedstate->vars[j]) MapInfo[i].savedstate->vars[j] = Bcalloc(MAXSPRITES,sizeof(intptr_t)); if (kdfread(&MapInfo[i].savedstate->vars[j][0],sizeof(intptr_t), MAXSPRITES, fil) != MAXSPRITES) goto corrupt; }