Merge branch 'fix-save' of https://github.com/argrath/NetHack into argrath

This commit is contained in:
nhmall
2022-02-09 15:45:01 -05:00

View File

@@ -423,6 +423,9 @@ savelev(NHFILE* nhfp, xchar lev)
#endif
g.program_state.saving++; /* even if current mode is FREEING */
if (!nhfp)
panic("Save on bad file!"); /* impossible */
/*
* Level file contents:
* version info (handled by caller);
@@ -449,8 +452,6 @@ savelev(NHFILE* nhfp, xchar lev)
if (iflags.purge_monsters)
dmonsfree();
if (!nhfp)
panic("Save on bad file!"); /* impossible */
if (lev >= 0 && lev <= maxledgerno())
g.level_info[lev].flags |= VISITED;
if (nhfp->structlevel)