From: Wolfgang (Blub) Bumiller Date: Thu, 23 Aug 2012 20:40:51 +0000 (+0200) Subject: Fixing handling of duplicate frame macros: 'continue' would continue the inner for... X-Git-Tag: 0.1-rc1~56 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7cfb9425a05d9fc79b5c04f27c20ffe298dab6d6;p=xonotic%2Fgmqcc.git Fixing handling of duplicate frame macros: 'continue' would continue the inner for, how could I miss that --- diff --git a/lexer.c b/lexer.c index 0809692..8d38e4a 100644 --- a/lexer.c +++ b/lexer.c @@ -405,9 +405,11 @@ static bool lex_finish_frames(lex_file *lex) lex->frames[i].value = lex->framevalue++; if (lexwarn(lex, WARN_FRAME_MACROS, "duplicate frame macro defined: `%s`", lex->tok->value)) return false; - continue; + break; } } + if (i < lex->frames_count) + continue; m.value = lex->framevalue++; m.name = lex->tok->value;