mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Fixed bounds error
This commit is contained in:
@@ -737,7 +737,7 @@ int _index(Interpreter* interpreter, LiteralArray* arguments) {
|
||||
|
||||
//copy compound into result
|
||||
int resultIndex = 0;
|
||||
for (int i = min; i >= lower && i <= AS_INTEGER(second); i += AS_INTEGER(third)) {
|
||||
for (int i = min; i >= 0 && i >= lower && i <= AS_INTEGER(second); i += AS_INTEGER(third)) {
|
||||
result[ resultIndex++ ] = AS_STRING(compound)[ i ];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user