diff --git a/source/script/arrayClass.c b/source/script/arrayClass.c index ae4c0758..cbb5684a 100644 --- a/source/script/arrayClass.c +++ b/source/script/arrayClass.c @@ -180,11 +180,11 @@ ClassFunction(arrayContains) { if (caller->variableType == StringArrayClass) { if (!strcmp(arg->string.value, iter.string.value)) - return newIntVariablePtr(1); + return newIntVariablePtr(i + 1); } else { if (arg->integer.value == iter.integer.value) - return newIntVariablePtr(1); + return newIntVariablePtr(i + 1); } }