X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fio.c;h=dc4ce744fee5cf1350af13c2c991a2096ba46441;hp=5d4ea9a13154752c0ed904fc55f3116ee41fb936;hb=4c3ff8ac78499d53339de7d67081e99582a9fb75;hpb=5191195da307757c381ca209d5b7f3e947dbd9ee diff --git a/src/io.c b/src/io.c index 5d4ea9a..dc4ce74 100644 --- a/src/io.c +++ b/src/io.c @@ -203,7 +203,10 @@ void cgetline(char *line, int max) strcat(line, "\n"); wrefresh(curwnd); } else { - fgets(line, max, stdin); + if (replayfp && !feof(replayfp)) + fgets(line, max, replayfp); + else + fgets(line, max, stdin); } if (logfp) fputs(line, logfp);