From 2f4691b20aaf36f0eb5bc9e4830eabcf74fabed2 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 3 Jun 2013 19:10:47 +0200 Subject: [PATCH] Don't abort replay on last turn. --- roguelike.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roguelike.c b/roguelike.c index d734726..5d42071 100644 --- a/roguelike.c +++ b/roguelike.c @@ -347,14 +347,15 @@ int main (int argc, char *argv[]) { int key; unsigned char quit_called; if (0 == world.interactive) { + unsigned char still_reading_file = 1; int action; while (1) { draw_all_windows (&win_meta); key = getch(); - if (key == get_action_key(world.keybindings, "wait / next turn") ) { + if (1 == still_reading_file && key == get_action_key(world.keybindings, "wait / next turn") ) { action = getc(file); if (EOF == action) - break; + still_reading_file = 0; else if (0 == action) player_wait (&world); else if ('s' == action) -- 2.30.2