From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 3 Jun 2013 17:10:47 +0000 (+0200)
Subject: Don't abort replay on last turn.
X-Git-Tag: tce~1253
X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/calendar_export?a=commitdiff_plain;h=2f4691b20aaf36f0eb5bc9e4830eabcf74fabed2;p=plomrogue

Don't abort replay on last turn.
---

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)