mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-09 13:41:45 +00:00
[Script] Return index on array.contains
This commit is contained in:
parent
e87301e160
commit
35a6bd9b41
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue