From b48c46fcf010ed7ee99ae717b4cc34466cd7dfaa Mon Sep 17 00:00:00 2001 From: FritzFlorian Date: Mon, 29 Jul 2019 12:49:15 +0200 Subject: [PATCH] Fix issue with assert macro not enclosing logical expressions. Now all expressions in the assert macro are enclosed in parentheses, avoiding issues. --- lib/pls/include/pls/internal/base/error_handling.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pls/include/pls/internal/base/error_handling.h b/lib/pls/include/pls/internal/base/error_handling.h index 341b7fb..15a2df6 100644 --- a/lib/pls/include/pls/internal/base/error_handling.h +++ b/lib/pls/include/pls/internal/base/error_handling.h @@ -12,6 +12,6 @@ * (or its inclusion adds too much overhead). */ #define PLS_ERROR(msg) printf("%s\n", msg); exit(1); -#define PLS_ASSERT(cond, msg) if (!cond) { PLS_ERROR(msg) } +#define PLS_ASSERT(cond, msg) if (!(cond)) { PLS_ERROR(msg) } #endif //PLS_ERROR_HANDLING_H -- libgit2 0.26.0