Skip to content

Commit

Permalink
Fix off-by-one in video menu mouse move cursor update
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed May 10, 2022
1 parent fc77de7 commit b8029e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Quake/gl_vidsdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ static void VID_MenuMouse (int cx, int cy)
--cursor; // past the gap, correct the index
else if (cursor == VID_OPT_TEST)
return; // inside the gap, do nothing
cursor = CLAMP (0, cursor, VIDEO_OPTIONS_ITEMS);
cursor = CLAMP (0, cursor, VIDEO_OPTIONS_ITEMS - 1);
video_options_cursor = cursor;
}

Expand Down

0 comments on commit b8029e0

Please sign in to comment.