summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWasm
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-04-22 11:02:41 +0430
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-04-22 21:12:47 +0430
commit846b2c8a99b517244af5e31a33d264f6518f5863 (patch)
tree002f44fff54443d19b026437ffd4c1f122eee179 /Userland/Libraries/LibWasm
parent6760ea33a0b8bcdbe847948c48fd7cd3f4d0e98d (diff)
downloadserenity-846b2c8a99b517244af5e31a33d264f6518f5863.zip
LibWasm: Push call results back in reverse order to preserve stack order
Diffstat (limited to 'Userland/Libraries/LibWasm')
-rw-r--r--Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp
index 9459806bdc..89e9dff285 100644
--- a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp
+++ b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp
@@ -138,7 +138,7 @@ void BytecodeInterpreter::call_address(Configuration& configuration, FunctionAdd
}
configuration.stack().entries().ensure_capacity(configuration.stack().size() + result.values().size());
- for (auto& entry : result.values())
+ for (auto& entry : result.values().in_reverse())
configuration.stack().entries().unchecked_append(move(entry));
}