diff --git a/entWatch4/scripting/entWatch-core.sp b/entWatch4/scripting/entWatch-core.sp index b4602ec..8068f73 100644 --- a/entWatch4/scripting/entWatch-core.sp +++ b/entWatch4/scripting/entWatch-core.sp @@ -749,7 +749,7 @@ public int Native_GetItemData(Handle hPlugin, int numParams) { 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); }