LibWasm: Drop the correct number of frames

Prior to this commit, we would be dropping an extra frame.
This commit is contained in:
Ali Mohammad Pur 2021-05-18 01:38:34 +04:30 committed by Ali Mohammad Pur
parent a21ebae652
commit d05e5dbdcf
Notes: sideshowbarker 2024-07-18 17:23:04 +09:00

View file

@ -59,7 +59,7 @@ void Interpreter::branch_to_label(Configuration& configuration, LabelIndex index
for (; !configuration.stack().is_empty();) {
auto& entry = configuration.stack().peek();
if (entry.has<NonnullOwnPtr<Label>>()) {
if (drop_count-- == 0)
if (--drop_count == 0)
break;
}
configuration.stack().pop();