From: rubenwardy Date: Sun, 5 Mar 2017 12:37:05 +0000 (+0000) Subject: sfinv: Fix wrong tab being highlighted X-Git-Tag: 0.4.16~73 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a16413f96c8db7d085591aafa431a8622a6e8324;p=oweals%2Fminetest_game.git sfinv: Fix wrong tab being highlighted Thank you to @ForbiddenJ for finding cause of the issue. --- diff --git a/mods/sfinv/api.lua b/mods/sfinv/api.lua index b6e97667..ff6433b9 100644 --- a/mods/sfinv/api.lua +++ b/mods/sfinv/api.lua @@ -70,7 +70,7 @@ function sfinv.get_formspec(player, context) nav[#nav + 1] = pdef.title nav_ids[#nav_ids + 1] = pdef.name if pdef.name == context.page then - current_idx = i + current_idx = #nav_ids end end end