diff options
Diffstat (limited to 'disasm/ndisasm.c')
-rw-r--r-- | disasm/ndisasm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/disasm/ndisasm.c b/disasm/ndisasm.c index 6b4ca49d..3269c367 100644 --- a/disasm/ndisasm.c +++ b/disasm/ndisasm.c @@ -65,12 +65,18 @@ static const char *help = static void output_ins(uint64_t, uint8_t *, int, char *); static void skip(uint32_t dist, FILE * fp); -static void ndisasm_verror(errflags severity, const char *fmt, va_list va) +fatal_func nasm_verror_critical(errflags severity, const char *fmt, va_list val) { - vfprintf(stderr, fmt, va); + vfprintf(stderr, fmt, val); + exit((severity & ERR_MASK) - ERR_FATAL + 2); +} - if (severity & ERR_FATAL) - exit(1); +static void ndisasm_verror(errflags severity, const char *fmt, va_list val) +{ + if ((severity & ERR_MASK) >= ERR_FATAL) + nasm_verror_critical(severity, fmt, val); + else + vfprintf(stderr, fmt, val); } int main(int argc, char **argv) |