diff options
Diffstat (limited to 'tools/evemu-play.c')
-rw-r--r-- | tools/evemu-play.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/evemu-play.c b/tools/evemu-play.c index 776843d..4140567 100644 --- a/tools/evemu-play.c +++ b/tools/evemu-play.c @@ -198,7 +198,10 @@ static int play_from_file(int recording_fd) printf("Hit enter to start replaying"); fflush(stdout); - fgets(line, sizeof(line), stdin); + + // fgets() returns NULL on EOF + if (!fgets(line, sizeof(line), stdin)) + break; fseek(fp, 0, SEEK_SET); ret = evemu_play(fp, fd); |