This commit is contained in:
Nikita Ivanov 2022-06-11 11:43:41 +05:00
parent 6900c4c9fa
commit 4ff1c04c80
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
2 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ static int peekn_char(Lexer *ctx, unsigned int i)
memmove(b->buf, b->buf + (b->len - i), i * sizeof(*b->buf)); memmove(b->buf, b->buf + (b->len - i), i * sizeof(*b->buf));
} }
b->pos = 0;
b->len = fread(b->buf + i, sizeof(*b->buf), LEN(b->buf) - i, b->f); b->len = fread(b->buf + i, sizeof(*b->buf), LEN(b->buf) - i, b->f);
b->pos = 0;
if (b->len != LEN(b->buf)) { if (b->len != LEN(b->buf)) {
if (feof(b->f)) if (feof(b->f))

View File

@ -10,7 +10,7 @@
#define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b))
#define STRINGIZE(x) STRINGIZE2(x) #define STRINGIZE(x) STRINGIZE2(x)
#define STRINGIZE2(x) #x #define STRINGIZE2(x) #x
#define FORMATTED_STRING(arr, format) \ #define FORMATTED_STRING(arr, format) \