From 7c51414228906c7e0e131a5794df34838db6619a Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 23 Mar 2012 12:39:42 -0700 Subject: [PATCH] Fixed sim_debug macro implementation to allow for the case when a sim_debug invocation is used as a single expression following an if condition. Found by Michael Bloom --- scp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.h b/scp.h index 52cf2b9f..4a50cffc 100644 --- a/scp.h +++ b/scp.h @@ -131,7 +131,7 @@ void sim_debug (uint32 dbits, DEVICE* dptr, const char* fmt, ...); #else void _sim_debug (uint32 dbits, DEVICE* dptr, const char* fmt, ...); extern FILE *sim_deb; /* debug file */ -#define sim_debug(dbits, dptr, ...) if (sim_deb && ((dptr)->dctrl & dbits)) _sim_debug (dbits, dptr, __VA_ARGS__) +#define sim_debug(dbits, dptr, ...) if (sim_deb && ((dptr)->dctrl & dbits)) _sim_debug (dbits, dptr, __VA_ARGS__); else 0 #endif void fprint_stopped_gen (FILE *st, t_stat v, REG *pc, DEVICE *dptr);