summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index 3e1463d6b..719e1e533 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -20,7 +20,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*));
bool exists(const char* filename);
//Caps values to min/max
-#define cap_value(a, min, max) ((a >= max) ? max : (a <= min) ? min : a)
+#define cap_value(a, min, max) (((a) >= (max)) ? (max) : ((a) <= (min)) ? (min) : (a))
/// calculates the value of A / B, in percent (rounded down)
unsigned int get_percentage(const unsigned int A, const unsigned int B);