Made clamp macro safer

This commit is contained in:
Clownacy 2019-05-04 21:33:08 +00:00
parent d2f1b2c1a9
commit dc0f242f25

View file

@ -20,7 +20,7 @@
#define STREAM_SIZE (FREQUENCY / 200) #define STREAM_SIZE (FREQUENCY / 200)
#endif #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 //Audio device
SDL_AudioDeviceID audioDevice; SDL_AudioDeviceID audioDevice;