lexer: Putback non-numerical token in number scanning

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-16 14:01:19 -05:00
parent 3e8a45a156
commit 0317c6a4ca

View File

@@ -386,6 +386,7 @@ lexer_scan_num(struct rifle_state *state, int lc, struct token *tok)
}
if (!isxdigit(c) && c != '_') {
lexer_putback(state, c);
buf[buf_ind] = '\0';
break;
}