1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-22 11:56:42 +00:00

[Script] Return index on array.contains

This commit is contained in:
suchmememanyskill 2022-01-21 11:05:09 +01:00
parent e87301e160
commit 35a6bd9b41

View file

@ -180,11 +180,11 @@ ClassFunction(arrayContains) {
if (caller->variableType == StringArrayClass) { if (caller->variableType == StringArrayClass) {
if (!strcmp(arg->string.value, iter.string.value)) if (!strcmp(arg->string.value, iter.string.value))
return newIntVariablePtr(1); return newIntVariablePtr(i + 1);
} }
else { else {
if (arg->integer.value == iter.integer.value) if (arg->integer.value == iter.integer.value)
return newIntVariablePtr(1); return newIntVariablePtr(i + 1);
} }
} }