mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-12-26 03:16:03 +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 (!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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue