Fix from Ed Beroset for unterminated %macro directive -> coredump

This commit is contained in:
H. Peter Anvin 2002-05-14 03:18:53 +00:00
parent ac6fb42b4b
commit 77ba0c6f98

View File

@ -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