From 1c752c03dbf61946b4aa6c4fd7e28b65ee6b0662 Mon Sep 17 00:00:00 2001 From: SpookyDervish Date: Mon, 13 Apr 2026 18:48:54 +1000 Subject: [PATCH] fix tiny bug --- libs/string/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/string/string.c b/libs/string/string.c index f2fab4b..2feca4c 100644 --- a/libs/string/string.c +++ b/libs/string/string.c @@ -68,7 +68,7 @@ GroundValue stringSubstring(GroundScope* scope, List args) { if (start >= inputLen) ERROR("Start is outside string!", "OutOfBounds"); - else if (end >= inputLen) + else if (end >= inputLen || end < 0) ERROR("End is outside string!", "OutOfBounds"); char* buffer = malloc(inputLen + 1);