diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-23 10:49:26 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-23 10:52:43 -0400 |
commit | ca348b6343376af269283db80ba2df5f775622d8 (patch) | |
tree | 996fc2346ee5690b726d062fac4642cbdff0b442 /preproc.c | |
parent | b916edecf427058f2345846075a382cb27bfbd75 (diff) | |
download | nasm-ca348b6343376af269283db80ba2df5f775622d8.tar.gz nasm-ca348b6343376af269283db80ba2df5f775622d8.tar.bz2 nasm-ca348b6343376af269283db80ba2df5f775622d8.zip |
preproc: restore correct break; in do_directive()
Checkin a26433db6805cf1f1d711eb820f6a50a98f54f36 incorrectly changed a
few break;s in do_directive() that were *inside loops* to returns.
This broke single-line macros as well as %exitrep; fix.
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -2658,7 +2658,7 @@ static int do_directive(Token * tline) */ for (l = istk->expansion; l; l = l->next) if (l->finishes && !l->finishes->name) - return DIRECTIVE_FOUND; + break; if (l) l->finishes->in_progress = 1; @@ -2721,15 +2721,15 @@ static int do_directive(Token * tline) skip_white_(tline); if (tok_is_(tline, ",")) { tline = tline->next; - continue; - } - if (!tok_is_(tline, ")")) { - error(ERR_NONFATAL, - "`)' expected to terminate macro template"); - free_tlist(origline); - return DIRECTIVE_FOUND; - } - return DIRECTIVE_FOUND; + } else { + if (!tok_is_(tline, ")")) { + error(ERR_NONFATAL, + "`)' expected to terminate macro template"); + free_tlist(origline); + return DIRECTIVE_FOUND; + } + break; + } } last = tline; tline = tline->next; |