AltairZ80, PDP10, PDP11, VAX: Fix incorrect sense of test on expression value in th ASSURE macro. Fix issue #126
This commit is contained in:
parent
a100c88f1d
commit
93b68432f2
1 changed files with 5 additions and 4 deletions
|
@ -747,10 +747,11 @@ typedef struct sim_bitfield BITFIELD;
|
||||||
/* This replaces any references to "assert()" which should never be invoked */
|
/* This replaces any references to "assert()" which should never be invoked */
|
||||||
/* with an expression which causes side effects (i.e. must be executed for */
|
/* with an expression which causes side effects (i.e. must be executed for */
|
||||||
/* the program to work correctly) */
|
/* the program to work correctly) */
|
||||||
#define ASSURE(_Expression) if (_Expression) {fprintf(stderr, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); \
|
#define ASSURE(_Expression) if (!(_Expression)) {char *_exp = #_Expression; char *_file = __FILE__; \
|
||||||
if (sim_log) fprintf(sim_log, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); \
|
fprintf(stderr, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
|
||||||
if (sim_deb) fprintf(sim_deb, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); \
|
if (sim_log) fprintf(sim_log, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
|
||||||
abort();} else (void)0
|
if (sim_deb) fprintf(sim_deb, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
|
||||||
|
abort();} else (void)0
|
||||||
|
|
||||||
/* Asynch/Threaded I/O support */
|
/* Asynch/Threaded I/O support */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue