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

i'm stupid, again

This commit is contained in:
suchmememanyskill 2021-07-31 23:07:49 +02:00
parent aa82664187
commit 0b3d4bf55c

View file

@ -86,7 +86,7 @@ ClassFunction(arraySlice) {
s64 skipAmount = getIntValue(*args); s64 skipAmount = getIntValue(*args);
s64 takeAmount = getIntValue(args[1]); s64 takeAmount = getIntValue(args[1]);
if (caller->solvedArray.vector.count < (skipAmount + takeAmount) || skipAmount <= 0 || takeAmount <= 0) { if (caller->solvedArray.vector.count < (skipAmount + takeAmount) || skipAmount < 0 || takeAmount <= 0) {
SCRIPT_FATAL_ERR("Slicing out of range of array with len %d", (int)caller->solvedArray.vector.count); SCRIPT_FATAL_ERR("Slicing out of range of array with len %d", (int)caller->solvedArray.vector.count);
} }