From 075d9002c2e530fd2020ff672525c6a39a42c050 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 25 Dec 2020 00:03:27 +0100 Subject: [PATCH] fixed hassert --- hyper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyper.h b/hyper.h index b650edb6..3a475f54 100644 --- a/hyper.h +++ b/hyper.h @@ -888,9 +888,9 @@ static inline void set_flag(flagtype& f, flagtype which, bool b) { // assert macro #ifdef NDEBUG -#define hassert(condition) if(!condition) __builtin_unreachable() +#define hassert(condition) if(!(condition)) __builtin_unreachable() #else -#define hassert(condition) if(condition) println(hlog, __FILE__, ":", __LINE__, ":", __func__, ": assertion failed: ", condition) +#define hassert(condition) if(!(condition)) println(hlog, __FILE__, ":", __LINE__, ":", __func__, ": assertion failed: ", #condition) #endif #define IS(z) = z