fix for off-by-one error (#2)

This commit is contained in:
Sami Lappalainen
2026-09-09 02:38:57 -05:00
committed by GitHub
parent 77c0dba2c4
commit c7905c2a70
+1 -1
View File
@@ -1672,7 +1672,7 @@ function API.IsItemInSlot(itemIdOrName, inventorySlot)
-- Use native v2.18 GetEquippedItem if available
if GetEquippedItem then
local slotInfo = GetEquippedItem("player", inventorySlot - 1) -- 0-indexed
local slotInfo = GetEquippedItem("player", inventorySlot)
if slotInfo and slotInfo.itemId then
local checkId = tonumber(itemIdOrName)
if checkId then