ref: dc0f242f251e59fd2bebf2a1c4dd7a8dc2677f5d
parent: d2f1b2c1a9f9afe74bdb0e9ad79f73c12e28cdb9
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat May 4 17:33:08 EDT 2019
Made clamp macro safer
--- a/src/Sound.cpp
+++ b/src/Sound.cpp
@@ -20,7 +20,7 @@
#define STREAM_SIZE (FREQUENCY / 200)
#endif
-#define clamp(x, y, z) ((x > z) ? z : (x < y) ? y : x)
+#define clamp(x, y, z) (((x) > (z)) ? (z) : ((x) < (y)) ? (y) : (x))
//Audio device
SDL_AudioDeviceID audioDevice;