summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-13 02:41:40 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-13 02:41:40 -0600
commitf57e3ffa95adfeb38fcba5ee900a4db22f92bd5f (patch)
tree412cc48712c62b2b500f9149ef884147b7b46977
parentb0e6d268d24494585091f0f2c1b74a4c941034c7 (diff)
properly limit page position in inventory
-rw-r--r--mods/vzxv_inv/ui.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/mods/vzxv_inv/ui.lua b/mods/vzxv_inv/ui.lua
index ec52c75..b227267 100644
--- a/mods/vzxv_inv/ui.lua
+++ b/mods/vzxv_inv/ui.lua
@@ -95,7 +95,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.prev then
state.page = state.page - 1
end
- if state.page > #dummy_inventory or state.page < 0 then
+ if (state.page + 1) * per_page > #dummy_inventory or state.page < 0 then
state.page = 1
end