From 23b8731e40b37084be4dbc2eaa3a456526b3e4a2 Mon Sep 17 00:00:00 2001 From: AlexVanin Date: Thu, 13 Feb 2014 11:07:19 +0400 Subject: [PATCH] Fixed bug when arguments of functon where in memory in wrong order --- VaninVM/LocalVars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VaninVM/LocalVars.c b/VaninVM/LocalVars.c index 9c8eeec..7023762 100644 --- a/VaninVM/LocalVars.c +++ b/VaninVM/LocalVars.c @@ -42,7 +42,7 @@ void args_to_local(context* cont, func** hash) { int i; long long tmp; - for (i=(hash[cont->id]->count_args)-1; i>=0; i--) + for (i=0; i<(hash[cont->id]->count_args); i++) { tmp = pop_int(); memmove(&((cont->locals)[i]), &tmp, sizeof(long long));