diff include/SDL_mouse.h @ 1046:f09d5edfc7a3

Added some parentheses for a little more macro safety. Recommended by Petri Kero, here: http://www.devolution.com/pipermail/sdl/2005-March/067630.html
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 17 Apr 2005 10:16:30 +0000
parents 04a403e4ccf5
children c9b51268668f
line wrap: on
line diff
--- a/include/SDL_mouse.h	Fri Apr 01 15:19:26 2005 +0000
+++ b/include/SDL_mouse.h	Sun Apr 17 10:16:30 2005 +0000
@@ -120,7 +120,7 @@
    Button 4:	Mouse wheel up	 (may also be a real button)
    Button 5:	Mouse wheel down (may also be a real button)
  */
-#define SDL_BUTTON(X)		(SDL_PRESSED<<(X-1))
+#define SDL_BUTTON(X)		(SDL_PRESSED << ((X)-1))
 #define SDL_BUTTON_LEFT		1
 #define SDL_BUTTON_MIDDLE	2
 #define SDL_BUTTON_RIGHT	3