From ca20ff4f4d0ac63856e538f9f4cef97197bf6465 Mon Sep 17 00:00:00 2001 From: c Date: Sun, 28 Jan 2024 21:43:37 -0500 Subject: Fixed buffer-overflow. --- src/lexer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lexer.c') diff --git a/src/lexer.c b/src/lexer.c index a89c9ad..a93828a 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -26,8 +26,6 @@ void lexer_destroy(lexer_t* lexer) { } void lexer_add_token(lexer_t* lexer, token_t* token) { - token_t* t; - if (lexer->tokenl) { lexer->tokenl_last->nxt = token; lexer->tokenl_last = token; @@ -47,7 +45,7 @@ void lexer_add_current_char(lexer_t* lexer, int type) { lexer_add_token(lexer, t); } -void lexer_add_current_char_to_last_token(lexer_t* lexer, int type) { +void lexer_add_current_char_to_last_token(lexer_t* lexer, token_type_t type) { if (lexer->tokenl_last && lexer->tokenl_last->type == type) { token_add_char(lexer->tokenl_last, *lexer->src); } else { -- cgit v1.2.3