mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
Fix from Ed Beroset for unterminated %macro directive -> coredump
This commit is contained in:
parent
ac6fb42b4b
commit
77ba0c6f98
@ -4010,14 +4010,14 @@ error(int severity, char *fmt, ...)
|
||||
char buff[1024];
|
||||
|
||||
/* If we're in a dead branch of IF or something like it, ignore the error */
|
||||
if (istk->conds && !emitting(istk->conds->state))
|
||||
if (istk && istk->conds && !emitting(istk->conds->state))
|
||||
return;
|
||||
|
||||
va_start(arg, fmt);
|
||||
vsprintf(buff, fmt, arg);
|
||||
va_end(arg);
|
||||
|
||||
if (istk->mstk && istk->mstk->name)
|
||||
if (istk && istk->mstk && istk->mstk->name)
|
||||
__error(severity | ERR_PASS1, "(%s:%d) %s", istk->mstk->name,
|
||||
istk->mstk->lineno, buff);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user