]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - term-utils/scriptreplay.c
scriptreplay: check for EOF
[thirdparty/util-linux.git] / term-utils / scriptreplay.c
index 78e2daa4d88ce2b537d4d93559ed238493374ef3..1aaf6753bbb446b5c81f761df0cb8793d4dd5de5 100644 (file)
@@ -377,8 +377,11 @@ static int replay_get_next_step(struct replay_setup *stp, char *streams, struct
                        break;
                }
 
-               if (rc)
-                       break;;         /* error */
+               if (rc) {
+                       if (rc < 0 && feof(stp->timing_fp))
+                               rc = 1;
+                       break;          /* error or EOF */
+               }
 
                DBG(TIMING, ul_debug(" step entry is '%c'", step->type));