diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-07 11:07:36 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-07 11:07:36 +0000 |
commit | 42bd8b1f83cf0c9c7c20a806bf399f503d822f72 (patch) | |
tree | df96df35d94e340230dcc6765373dd3f6daf8783 | |
parent | c4d7b093687925eb35edfa0956a432af3bbdff24 (diff) | |
download | crawl-ref-42bd8b1f83cf0c9c7c20a806bf399f503d822f72.tar.gz crawl-ref-42bd8b1f83cf0c9c7c20a806bf399f503d822f72.zip |
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
-rw-r--r-- | crawl-ref/source/util/levcomp.lpp | 2 |
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; } |