From 55578a56b73dff5374e4b9c59dcece96f86714f9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 31 Oct 2020 22:33:12 +0100 Subject: main: fix leading byte corruption when not starting with #! Reverse the order of the ungetc() calls to properly restore the first two probed bytes. Signed-off-by: Jo-Philipp Wich --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 2abe485..881b8fd 100644 --- a/main.c +++ b/main.c @@ -162,8 +162,8 @@ parse(struct ut_state *state, struct ut_source *src, bool dumponly, } } else { - ungetc(c, src->fp); ungetc(c2, src->fp); + ungetc(c, src->fp); } } -- cgit v1.2.3