Merge branch 'master' into NetHack-3.7

This commit is contained in:
nhmall
2019-06-30 16:58:37 -04:00
4 changed files with 23 additions and 7 deletions

View File

@@ -886,6 +886,9 @@ boolean restoring_msghist;
static boolean initd = FALSE;
static int stash_count;
static nhprev_mesg *stash_head = 0;
#ifdef DUMPLOG
extern unsigned saved_pline_index; /* pline.c */
#endif
if (restoring_msghist && !initd) {
/* hide any messages we've gathered since starting current session
@@ -895,12 +898,19 @@ boolean restoring_msghist;
stash_head = first_mesg, first_mesg = (nhprev_mesg *) 0;
last_mesg = (nhprev_mesg *) 0; /* no need to remember the tail */
initd = TRUE;
#ifdef DUMPLOG
/* this suffices; there's no need to scrub saved_pline[] pointers */
saved_pline_index = 0;
#endif
}
if (msg) {
mesg_add_line(msg);
/* treat all saved and restored messages as turn #1 */
last_mesg->turn = 1L;
#ifdef DUMPLOG
dumplogmsg(last_mesg->str);
#endif
} else if (stash_count) {
nhprev_mesg *mesg;
long mesg_turn;
@@ -920,6 +930,9 @@ boolean restoring_msghist;
mesg_add_line(mesg->str);
/* added line became new tail */
last_mesg->turn = mesg_turn;
#ifdef DUMPLOG
dumplogmsg(mesg->str);
#endif
free((genericptr_t) mesg->str);
free((genericptr_t) mesg);
}