From 0b3d4bf55c43ca7734d5f228c44761b30f65f9ee Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Sat, 31 Jul 2021 23:07:49 +0200 Subject: [PATCH] i'm stupid, again --- source/script/arrayClass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/script/arrayClass.c b/source/script/arrayClass.c index fdc10c1..ae4c075 100644 --- a/source/script/arrayClass.c +++ b/source/script/arrayClass.c @@ -86,7 +86,7 @@ ClassFunction(arraySlice) { s64 skipAmount = getIntValue(*args); 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); }