Fixed bug when arguments of functon where in memory in wrong order

This commit is contained in:
Alex Vanin 2014-02-13 11:07:19 +04:00
parent 2ff331b755
commit 23b8731e40

View file

@ -42,7 +42,7 @@ void args_to_local(context* cont, func** hash)
{ {
int i; int i;
long long tmp; 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(); tmp = pop_int();
memmove(&((cont->locals)[i]), &tmp, sizeof(long long)); memmove(&((cont->locals)[i]), &tmp, sizeof(long long));