diff options
| author | 0x221e | 2026-06-17 00:05:36 +0200 |
|---|---|---|
| committer | 0x221e | 2026-06-17 00:05:36 +0200 |
| commit | 9224992817c3faf7d6274681fb5bacc5ad761504 (patch) | |
| tree | f795158e912052095c68a6ad736fe77840d664da /include | |
| parent | e3cb7a6cab35947bb200f982f5fa8017b96bc15f (diff) | |
lex: fix lex_advance() and replace l->pos additions
l->pos increments are replaced with lex_advance, which now accepts
offsets. lex_advance() now returns 0 and does not increment past
buffer size upon out-of-bounds.
Diffstat (limited to 'include')
| -rw-r--r-- | include/lex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/lex.h b/include/lex.h index 4b8b1ac..634be5f 100644 --- a/include/lex.h +++ b/include/lex.h @@ -48,7 +48,7 @@ struct lex { size_t line; }; -char lex_advance(struct lex *l); +char lex_advance(struct lex *l, size_t o); char lex_seek(struct lex *l, size_t o); struct token lex_number(struct lex *l); |
