free overview->final_resting_place

The #overview command can provide some feedback about levels loaded
from bones files; that data wasn't being released at end of game.

(There are two copies of that data, one set always in memory with
the overview data [final_resting_place field in the 'mapseen' data],
and another set with portions attached to each relevant level [via
level.bonesinfo].  Neither set was being properly freed; this only
addresses one of them, so far. The per-level data can probably be
eliminated--for post-3.6--since DUNGEON_OVERVIEW isn't a conditional
feature as it was when that was implemented.)
This commit is contained in:
PatR
2019-05-25 23:43:42 -07:00
parent f5bc41cc53
commit 5cc7301965
2 changed files with 8 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.18 $ $NHDT-Date: 1558794988 2019/05/25 14:36:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.22 $ $NHDT-Date: 1558853011 2019/05/26 06:43:31 $
This fixes36.3 file is here to capture information about updates in the 3.6.x This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however, lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -24,6 +24,7 @@ when co-located with a boulder you could sometimes swap places with pets of
on rare occasions, multiple mine's end luckstones were being marked as the on rare occasions, multiple mine's end luckstones were being marked as the
prize and triggering an impossible() on a public server prize and triggering an impossible() on a public server
make sure the correct luckstone is the prize in mine's end make sure the correct luckstone is the prize in mine's end
free dungeon overview's bones information at end of game
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dungeon.c $NHDT-Date: 1554341477 2019/04/04 01:31:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.92 $ */ /* NetHack 3.6 dungeon.c $NHDT-Date: 1558853012 2019/05/26 06:43:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.94 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -181,6 +181,8 @@ boolean perform_write, free_data;
next_ms = curr_ms->next; next_ms = curr_ms->next;
if (curr_ms->custom) if (curr_ms->custom)
free((genericptr_t) curr_ms->custom); free((genericptr_t) curr_ms->custom);
if (curr_ms->final_resting_place)
savecemetery(fd, FREE_SAVE, &curr_ms->final_resting_place);
free((genericptr_t) curr_ms); free((genericptr_t) curr_ms);
} }
mapseenchn = 0; mapseenchn = 0;
@@ -2155,7 +2157,8 @@ int ledger_num;
struct cemetery *bp, *bpnext; struct cemetery *bp, *bpnext;
for (mptr = mapseenchn; mptr; mprev = mptr, mptr = mptr->next) for (mptr = mapseenchn; mptr; mprev = mptr, mptr = mptr->next)
if (dungeons[mptr->lev.dnum].ledger_start + mptr->lev.dlevel == ledger_num) if (dungeons[mptr->lev.dnum].ledger_start + mptr->lev.dlevel
== ledger_num)
break; break;
if (!mptr) if (!mptr)
@@ -2652,8 +2655,7 @@ recalc_mapseen()
} }
/*ARGUSED*/ /*ARGUSED*/
/* valley and sanctum levels get automatic annotation once temple is entered /* valley and sanctum levels get automatic annotation once temple is entered */
*/
void void
mapseen_temple(priest) mapseen_temple(priest)
struct monst *priest UNUSED; /* currently unused; might be useful someday */ struct monst *priest UNUSED; /* currently unused; might be useful someday */