From 316baa2510367a31029f4ff8cfb206095d4d2c78 Mon Sep 17 00:00:00 2001 From: Tung Nguyen Date: Thu, 30 Aug 2012 14:14:39 +1000 Subject: [PATCH] Clear last messages for dumplog between characters Without this fix, playing a session with one character, saving, then loading and ending another character in the same session would cause the former character's last messages to appear in the latter's dumplog. This fixes issue #11 on [the DynaHack repo]. (cherry picked from commit 653784f06cdf59b61a04f9ffa4593e45d97e6e0a) Conflicts: libnitrohack/src/decl.c --- libnitrohack/src/decl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libnitrohack/src/decl.c b/libnitrohack/src/decl.c index 16bbddcf..2e3e4873 100644 --- a/libnitrohack/src/decl.c +++ b/libnitrohack/src/decl.c @@ -242,6 +242,8 @@ init_data(void) memset(&digging, 0, sizeof (digging)); memset(&inv_pos, 0, sizeof (inv_pos)); memset(multi_txt, 0, sizeof (multi_txt)); + memset(toplines, 0, sizeof(toplines)); + memset(toplines_count, 0, sizeof(toplines_count)); level = NULL; multi = occtime = killer_format = 0; @@ -270,6 +272,7 @@ init_data(void) histevents = NULL; histcount = 0; timer_id = 1; + curline = 0; program_state.restoring = in_restore; iflags.disable_log = nolog;