From 2023a7b2d9656f80b00de81453348c0a66f200f7 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 14 Aug 2024 20:44:26 +0300 Subject: test cleanup + Somewhat poor Git hygiene but I also fixed some bugs while I was at it. --- src/lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lexer.l') diff --git a/src/lexer.l b/src/lexer.l index b38833d..3d5a413 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -165,7 +165,7 @@ STRING \"(\\.|[^"\\])*\" {STRING} { /* seems risky, I know, but letting the parser choose when to allocate a * new string seems to help with syntax error cleanup */ - yylval->str = yytext; + yylval->str = strdup(yytext); return STRING; } -- cgit v1.3