]> granicus.if.org Git - nethack/commitdiff
Added nhassert() support to tile2bmp.
authorBart House <bart@barthouse.com>
Thu, 22 Nov 2018 23:03:00 +0000 (15:03 -0800)
committerBart House <bart@barthouse.com>
Fri, 23 Nov 2018 23:22:51 +0000 (15:22 -0800)
win/share/tile2bmp.c

index ca2c7dd734a2cd1180661450dee2d6c9d29ca263..6722bbc26a75ba3bb0db5c1a7d1719a24d8187c9 100644 (file)
@@ -360,3 +360,10 @@ pixel (*pixels)[TILE_X];
         }
     }
 }
+
+/* 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);
+}