diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-31 22:33:12 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-31 22:39:42 +0100 |
commit | 55578a56b73dff5374e4b9c59dcece96f86714f9 (patch) | |
tree | 2830ad1cd96863935b2b93d103154704a097cdc2 | |
parent | 3fe96c552080619a02e6fa0b085c2b1ad32805b6 (diff) |
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 <jo@mein.io>
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } } |