From: Bart House Date: Thu, 22 Nov 2018 23:03:26 +0000 (-0800) Subject: Added nhassert() support. X-Git-Tag: NetHack-3.6.2_Released~161^2~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31dc1c9233960606fa049fbd6377d2ba7c379036;p=nethack Added nhassert() support. --- diff --git a/util/lev_main.c b/util/lev_main.c index ecf7a444c..729549791 100644 --- a/util/lev_main.c +++ b/util/lev_main.c @@ -1637,4 +1637,11 @@ short ospeed; #endif #endif /* STRICT_REF_DEF */ +/* nhassert_failed is called when an nhassert's condition is false */ +void nhassert_failed(const char * exp, const char * file, int line) +{ + fprintf(stderr, "NHASSERT(%s) in '%s' at line %d\n", exp, file, line); + exit(EXIT_FAILURE); +} + /*lev_main.c*/