aboutsummaryrefslogtreecommitdiff
path: root/vm.d
diff options
context:
space:
mode:
authormryouse2023-05-25 02:52:11 +0000
committermryouse2023-05-25 02:52:11 +0000
commitf90b882fe50d982293be5427457efea565173261 (patch)
tree8e0e247aec6ab49beb33e96b80a2c620a54ff5cb /vm.d
parente41f682a897950ec9454728ae6ba83c5a7973f98 (diff)
bugfix: when calling functions with multiple args, don't reverse them
Diffstat (limited to 'vm.d')
-rw-r--r--vm.d4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.d b/vm.d
index 8ac1934..4cb03f5 100644
--- a/vm.d
+++ b/vm.d
@@ -511,8 +511,8 @@ class VM {
cnt--;
}
- foreach (Value val ; tmp) {
- this.pushB(val);
+ for (int i = to!int(tmp.length) - 1; i >= 0; i--) {
+ this.pushB(tmp[i]);
}
//if (!callValue(peekA(argCount), argCount)) { // i'm allocating variables wrong