From: H. Peter Anvin Date: Tue, 14 May 2002 03:18:53 +0000 (+0000) Subject: Fix from Ed Beroset for unterminated %macro directive -> coredump X-Git-Tag: nasm-2.11.05~2438 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77ba0c6f986d41fecdd7ed63bd609127a98058fc;p=platform%2Fupstream%2Fnasm.git Fix from Ed Beroset for unterminated %macro directive -> coredump --- diff --git a/preproc.c b/preproc.c index cba80e9..4fad1c1 100644 --- a/preproc.c +++ b/preproc.c @@ -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