forked from ground/ground
fix tiny bug
This commit is contained in:
@@ -68,7 +68,7 @@ GroundValue stringSubstring(GroundScope* scope, List args) {
|
|||||||
|
|
||||||
if (start >= inputLen)
|
if (start >= inputLen)
|
||||||
ERROR("Start is outside string!", "OutOfBounds");
|
ERROR("Start is outside string!", "OutOfBounds");
|
||||||
else if (end >= inputLen)
|
else if (end >= inputLen || end < 0)
|
||||||
ERROR("End is outside string!", "OutOfBounds");
|
ERROR("End is outside string!", "OutOfBounds");
|
||||||
|
|
||||||
char* buffer = malloc(inputLen + 1);
|
char* buffer = malloc(inputLen + 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user