From 5f3c8265f2717f72d68d8eb170fbe2dd114d7b76 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 14 Jan 2023 13:20:48 +0000 Subject: fix lots more bugs, add better logging --- includes/compiler/CError.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/compiler') diff --git a/includes/compiler/CError.h b/includes/compiler/CError.h index 754bdef..8eaefd9 100644 --- a/includes/compiler/CError.h +++ b/includes/compiler/CError.h @@ -3,8 +3,8 @@ #include "compiler/common.h" -#define CError_ASSERT(line, cond) if (!(cond)) { CError_Internal(__FILE__, line); } -#define CError_FAIL(line, cond) if (cond) { CError_Internal(__FILE__, line); } +#define CError_ASSERT(line, cond) do { if (!(cond)) { CError_Internal(__FILE__, line); } } while (0) +#define CError_FAIL(line, cond) do { if (cond) { CError_Internal(__FILE__, line); } } while (0) #define CError_FATAL(line) do { CError_Internal(__FILE__, line); } while (0) enum { -- cgit v1.2.3