Skip to content

Commit

Permalink
Fix off-by-one error
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielOaks committed Dec 31, 2014
1 parent 0e6a90e commit b2e205d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ void on_scroll(GLFWwindow *window, double xdelta, double ydelta) {
ypos += ydelta;
if (ypos < -SCROLL_THRESHOLD) {
g->item_index++;
if (g->item_index >= last_item_id) {
if (g->item_index > last_item_id) {
g->item_index = 0;
}
ypos = 0;
Expand Down

0 comments on commit b2e205d

Please sign in to comment.