aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agi/menu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index a127a060fd..160609a15b 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -387,9 +387,9 @@ bool Menu::keyhandler(int key) {
v_cur_menu += key == KEY_DOWN ? 1 : -1;
if (v_cur_menu < 0)
- v_cur_menu = 0;
- if (v_cur_menu > v_max_menu[h_cur_menu])
v_cur_menu = v_max_menu[h_cur_menu];
+ if (v_cur_menu > v_max_menu[h_cur_menu])
+ v_cur_menu = 0;
draw_menu_option(h_cur_menu);
draw_menu_option_hilite(h_cur_menu, v_cur_menu);