mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
Slightly faster implementation of the deadman counter
Count down to zero instead of up to a constant...
This commit is contained in:
parent
cb1cf59312
commit
2a15e69ebe
@ -2994,7 +2994,7 @@ static Token *expand_smacro(Token * tline)
|
||||
Token *org_tline = tline;
|
||||
Context *ctx;
|
||||
char *mname;
|
||||
int deadman = 0;
|
||||
int deadman = DEADMAN_LIMIT;
|
||||
|
||||
/*
|
||||
* Trick: we should avoid changing the start token pointer since it can
|
||||
@ -3016,7 +3016,7 @@ again:
|
||||
thead = NULL;
|
||||
|
||||
while (tline) { /* main token loop */
|
||||
if (++deadman > DEADMAN_LIMIT) {
|
||||
if (!--deadman) {
|
||||
error(ERR_NONFATAL, "interminable macro recursion");
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user