[bugfix] pic_apply_argv concatenated args in reverse order
This commit is contained in:
parent
78cafe3db7
commit
ceedd05ef0
1
src/vm.c
1
src/vm.c
|
@ -277,6 +277,7 @@ pic_apply_argv(pic_state *pic, struct pic_proc *proc, size_t argc, ...)
|
||||||
while (argc--) {
|
while (argc--) {
|
||||||
v = pic_cons(pic, va_arg(ap, pic_value), v);
|
v = pic_cons(pic, va_arg(ap, pic_value), v);
|
||||||
}
|
}
|
||||||
|
v = pic_reverse(pic, v);
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return pic_apply(pic, proc, v);
|
return pic_apply(pic, proc, v);
|
||||||
|
|
Loading…
Reference in New Issue