commit 7fba51670da03030dac6ae4c83671cb4adeb7cc6
parent a33ea46f91b216961b7897b0e0618f0d6411b368
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Tue, 20 Jul 2021 19:17:48 -0700
Fix MAX and MIN macros
This fixes the split function.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aps/util.h b/aps/util.h
@@ -2,8 +2,8 @@
#define LEN(X) (sizeof(X) / sizeof(*X))
-#define MAX(A,B) (A > B ? A : B)
-#define MIN(A,B) (A < B ? A : B)
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
#define ASSERT(EXP) ((EXP) ? 0 : BUG(#EXP))
#define BUG(WHY) (bug(__FILE__, __LINE__, WHY))