mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Bugfix a leak?
This commit is contained in:
@@ -1767,8 +1767,9 @@ static bool execIndexAssign(Toy_Interpreter* interpreter) {
|
||||
assign = Toy_popLiteralArray(&interpreter->stack);
|
||||
}
|
||||
else {
|
||||
compound = result; //no free
|
||||
|
||||
compound = result;
|
||||
Toy_freeLiteral(result);
|
||||
|
||||
//suppress the extra assign value
|
||||
Toy_Literal tmp = Toy_popLiteralArray(&interpreter->stack);
|
||||
Toy_freeLiteral(tmp);
|
||||
@@ -1780,6 +1781,10 @@ static bool execIndexAssign(Toy_Interpreter* interpreter) {
|
||||
compound = Toy_popLiteralArray(&interpreter->stack);
|
||||
|
||||
if (TOY_IS_IDENTIFIER(compound)) {
|
||||
if (freeIdn) {
|
||||
Toy_freeLiteral(compoundIdn);
|
||||
}
|
||||
|
||||
compoundIdn = compound;
|
||||
Toy_parseIdentifierToValue(interpreter, &compound);
|
||||
freeIdn = true;
|
||||
|
||||
Reference in New Issue
Block a user