summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-23 10:49:26 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-07-23 10:52:43 -0400
commitca348b6343376af269283db80ba2df5f775622d8 (patch)
tree996fc2346ee5690b726d062fac4642cbdff0b442
parentb916edecf427058f2345846075a382cb27bfbd75 (diff)
downloadnasm-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.
-rw-r--r--preproc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/preproc.c b/preproc.c
index 9f520c3..7ba1b6f 100644
--- a/preproc.c
+++ b/preproc.c
@@ -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;