Commit b48c46fc by FritzFlorian

Fix issue with assert macro not enclosing logical expressions.

Now all expressions in the assert macro are enclosed in parentheses, avoiding issues.
parent f671c042
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment