Skip to content

Commit

Permalink
Clear last messages for dumplog between characters
Browse files Browse the repository at this point in the history
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 ComputerScienceHouse#11 on [the DynaHack repo].

(cherry picked from commit 653784f06cdf59b61a04f9ffa4593e45d97e6e0a)

Conflicts:
	libnitrohack/src/decl.c
  • Loading branch information
tung authored and Alex Smith committed Oct 4, 2013
1 parent 33707a5 commit 316baa2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libnitrohack/src/decl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 316baa2

Please sign in to comment.