summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/levcomp.lpp
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/util/levcomp.lpp')
-rw-r--r--crawl-ref/source/util/levcomp.lpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp
index e50372fd36..3267f48ed4 100644
--- a/crawl-ref/source/util/levcomp.lpp
+++ b/crawl-ref/source/util/levcomp.lpp
@@ -15,6 +15,7 @@ static void clean()
if (yylval.text && alloced)
free( (void*) yylval.text);
yylval.text = NULL;
+ alloced = false;
}
static void settext()
@@ -98,6 +99,7 @@ north_dis return NORTH_DIS;
, return COMMA;
[0-9]+ {
+ clean();
yylval.i = atoi(yytext);
return INTEGER;
}