From 148806b33200a8127738de3233b202f78fdfb93d Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 17 Aug 2022 10:25:31 +0100 Subject: [PATCH] Protect ARRAY_SIZE macro from multiple division usage --- distrho/src/DistrhoDefines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h index e42eec2c..452e802f 100644 --- a/distrho/src/DistrhoDefines.h +++ b/distrho/src/DistrhoDefines.h @@ -211,7 +211,7 @@ private: \ #endif /* Useful macros */ -#define ARRAY_SIZE(ARRAY) sizeof(ARRAY)/sizeof(ARRAY[0]) +#define ARRAY_SIZE(ARRAY) (sizeof(ARRAY)/sizeof(ARRAY[0])) /* Useful typedefs */ typedef unsigned char uchar;