Explorar el Código

bugfix: correctly handle menu states

SimplyMinimal hace 2 años
padre
commit
54b6667edb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      game_reversi.c

+ 1 - 1
game_reversi.c

@@ -253,7 +253,7 @@ bool handle_key_menu(AppState *app_state, InputKey key) {
     }
     }
     break;
     break;
   case InputKeyDown:
   case InputKeyDown:
-    if (app_state->selected_menu_item <= MENU_ITEMS_COUNT) {
+    if (app_state->selected_menu_item < MENU_ITEMS_COUNT - 1) {
       app_state->selected_menu_item++;
       app_state->selected_menu_item++;
     }
     }
     break;
     break;