From f90b882fe50d982293be5427457efea565173261 Mon Sep 17 00:00:00 2001 From: mryouse Date: Thu, 25 May 2023 02:52:11 +0000 Subject: bugfix: when calling functions with multiple args, don't reverse them --- vm.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm.d') 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 -- cgit v1.2.3