]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fixing handling of duplicate frame macros: 'continue' would continue the inner for...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 23 Aug 2012 20:40:51 +0000 (22:40 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 23 Aug 2012 20:40:51 +0000 (22:40 +0200)
lexer.c

diff --git a/lexer.c b/lexer.c
index 080969250af38dab471e465ac4dad1ed922e7a8d..8d38e4aae38724230caf524872617adabbf6bc24 100644 (file)
--- 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;