aboutsummaryrefslogtreecommitdiff
path: root/src/lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer.l')
-rw-r--r--src/lexer.l2
1 files changed, 1 insertions, 1 deletions
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;
}