mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed a leak
This commit is contained in:
@@ -119,6 +119,7 @@ int _set(Interpreter* interpreter, LiteralArray* arguments) {
|
||||
}
|
||||
|
||||
//don't use pushLiteralArray, since we're setting
|
||||
freeLiteral(AS_ARRAY(obj)->literals[AS_INTEGER(key)]); //BUGFIX: clear any existing data first
|
||||
AS_ARRAY(obj)->literals[AS_INTEGER(key)] = copyLiteral(val);
|
||||
|
||||
if (!setScopeVariable(interpreter->scope, idn, obj, true)) {
|
||||
|
||||
Reference in New Issue
Block a user