From 6b5b6bc91c9206ecfe32f70496ba8e847450fa16 Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Sat, 11 Jun 2022 13:20:18 +0500 Subject: [PATCH] Fix --- src/lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexer.c b/src/lexer.c index a5ac9ec..2501b20 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -79,7 +79,7 @@ static int peekn_char(Lexer *ctx, unsigned int i) memmove(b->buf, b->buf + (b->len - i), i * sizeof(*b->buf)); } - b->len = fread(b->buf + i, sizeof(*b->buf), LEN(b->buf) - i, b->f); + b->len = i + fread(b->buf + i, sizeof(*b->buf), LEN(b->buf) - i, b->f); b->pos = 0; if (b->len != LEN(b->buf)) {