Skip to content

Commit 452c7ab

Browse files
committed
VirtualMachine: Fix register leak in repeat until loop
1 parent 8130359 commit 452c7ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/engine/virtualmachine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ unsigned int *VirtualMachine::run(unsigned int *pos, RunningScript *script)
178178
loopEnd = run(loopStart, script);
179179
run(pos, script);
180180
} while (!READ_LAST_REG()->toBool());
181+
FREE_REGS(1);
181182
} else {
182183
loopEnd = loopStart;
183184
while (*loopEnd != OP_LOOP_END && *loopEnd != OP_HALT)

0 commit comments

Comments
 (0)