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