Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created November 2, 2014 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahrl/c416594c2e20841e93f4 to your computer and use it in GitHub Desktop.
Save kahrl/c416594c2e20841e93f4 to your computer and use it in GitHub Desktop.
diff --git a/src/game.cpp b/src/game.cpp
index a700da8..9836054 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2402,7 +2402,7 @@ void MinetestApp::processItemSelection(u16 *new_playeritem)
player->hud_hotbar_itemcount - 1);
if (wheel < 0)
- *new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : max_item;
+ *new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : 0;
else if (wheel > 0)
*new_playeritem = *new_playeritem > 0 ? *new_playeritem - 1 : max_item;
// else wheel == 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment