diff --git a/src/cc/rogue/io.c b/src/cc/rogue/io.c index f4a859b38..f52b206ce 100644 --- a/src/cc/rogue/io.c +++ b/src/cc/rogue/io.c @@ -161,8 +161,9 @@ readchar(struct rogue_state *rs) rs->replaydone = (uint32_t)time(NULL); return(rs->keystrokes[rs->ind++]); } - fatal("replay finished but readchar called\n"); - return(' '); + //fatal("replay finished but readchar called\n"); + rs->replaydone = (uint32_t)time(NULL); + return(ESCAPE); } if ( rs == 0 || rs->guiflag != 0 ) { @@ -277,10 +278,18 @@ wait_for(struct rogue_state *rs,int ch) if (ch == '\n') while ((c = readchar(rs)) != '\n' && c != '\r') - continue; + { + if ( rs->replaydone != 0 ) + return; + continue; + } else while (readchar(rs) != ch) - continue; + { + if ( rs->replaydone != 0 ) + return; + continue; + } } /* diff --git a/src/cc/rogue/rogue.c b/src/cc/rogue/rogue.c index f56371815..3d4e012ac 100644 --- a/src/cc/rogue/rogue.c +++ b/src/cc/rogue/rogue.c @@ -543,7 +543,7 @@ playit(struct rogue_state *rs) { if ( rs->replaydone != 0 ) { - //fprintf(stderr,"replaydone\n"); sleep(3); + fprintf(stderr,"replaydone\n"); sleep(3); return; } if ( rs->sleeptime != 0 )