mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Clamp hotbar selection to slots that exist (#14869)
This commit is contained in:
@@ -1842,7 +1842,7 @@ int ObjectRef::l_hud_get_hotbar_itemcount(lua_State *L)
|
||||
if (player == nullptr)
|
||||
return 0;
|
||||
|
||||
lua_pushinteger(L, player->getHotbarItemcount());
|
||||
lua_pushinteger(L, player->getMaxHotbarItemcount());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user