fixed bug causing access to negative array index
[rocksndiamonds.git] / src / screens.c
index dc28e237a19db3810867bf82440545bb782c1c41..0e4c09c9599e961e5137c9021bc91bab6556abee 100644 (file)
@@ -6570,7 +6570,7 @@ static boolean CustomizeKeyboardMain(int player_nr)
   };
   int font_nr_old = FONT_VALUE_OLD;
   int font_nr_new = FONT_VALUE_1;
-  int success = FALSE;
+  boolean success = FALSE;
 
   if (SCR_FIELDX < SCR_FIELDX_DEFAULT)
   {
@@ -7002,6 +7002,8 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
                /* leave screen */
                success = FALSE;
                done = TRUE;
+
+               break;
              }
 
              /* undo this step */