mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-19 16:54:08 +10:00
Added an out-of-bounds check
This commit is contained in:
@@ -77,6 +77,8 @@ bool setLiteralArray(LiteralArray* array, Literal index, Literal value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO: implicit push when referencing one-past-the-end?
|
||||
|
||||
freeLiteral(array->literals[idx]);
|
||||
array->literals[idx] = copyLiteral(value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user