git: 473e9fcab4ea - main - script: Handle a missing 's' stamp gracefully.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Oct 2022 20:11:53 UTC
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=473e9fcab4ea9379f53e1f7d8e41f5a5754d0007 commit 473e9fcab4ea9379f53e1f7d8e41f5a5754d0007 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2022-10-27 20:04:48 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2022-10-27 20:11:36 +0000 script: Handle a missing 's' stamp gracefully. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37182 --- usr.bin/script/script.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index bee250c072b9..1d3588c26d8b 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -552,6 +552,8 @@ playback(FILE *fp) tclock = stamp.scr_sec; tso.tv_sec = stamp.scr_sec; tso.tv_nsec = stamp.scr_usec * 1000; + if (nread == 0) + tsi = tso; switch (stamp.scr_direction) { case 's':