From 20dd5128709b0ab17b6a730c760eab951a31c51c Mon Sep 17 00:00:00 2001 From: bumbread Date: Sat, 29 Oct 2022 14:32:12 +1100 Subject: [PATCH] fix assert macro --- inc/assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/assert.h b/inc/assert.h index 0312334..7b038be 100644 --- a/inc/assert.h +++ b/inc/assert.h @@ -22,7 +22,7 @@ void _assert( #else // In debug mode there shouldn't be any optimizations so this should // work as a simple way to cause a trap. - #define assert(c) if (!(c)) *(volatile int *)0 = 0 + #define assert(c) do { if (!(c)) *(volatile int *)0 = 0; } while(0) #endif #else #define _static_assert _Static_assert