[entWatch-core] Fix native bound check.

This commit is contained in:
zaCade 2025-03-09 16:35:06 +01:00
parent b824afd1a3
commit 786225b6a2

View File

@ -749,7 +749,7 @@ public int Native_GetItemData(Handle hPlugin, int numParams)
{ {
int index = GetNativeCell(1); int index = GetNativeCell(1);
if ((index < 0) || (index > g_hArray_Items.Length)) if ((index < 0) || (index >= g_hArray_Items.Length))
{ {
return ThrowNativeError(SP_ERROR_INDEX, "Item index %d is invalid.", index); return ThrowNativeError(SP_ERROR_INDEX, "Item index %d is invalid.", index);
} }