mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
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
This commit is contained in:
parent
8d930bf35d
commit
9190ee2139
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue