From 42bd8b1f83cf0c9c7c20a806bf399f503d822f72 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 7 Nov 2006 11:07:36 +0000 Subject: Fixed lexer bug that caused segfaults after reading integer parameters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@354 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/util/levcomp.lpp | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3-54-g00ecf