summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-15 21:18:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-15 21:18:31 -0700
commit088cc06dcf434b700da425b2f18b2a9a0ea46889 (patch)
treefb6f08f0c2000201e6dd39e77659be14d118bbf6 /lib.c
parent8044736902ca9e55d28094e25d28f133975b2bdf (diff)
downloadtxr-088cc06dcf434b700da425b2f18b2a9a0ea46889.tar.gz
txr-088cc06dcf434b700da425b2f18b2a9a0ea46889.tar.bz2
txr-088cc06dcf434b700da425b2f18b2a9a0ea46889.zip
vm: bugfix: wrong setup of closure param counts.
* lib.c (func_vm): The fixparam argument is the total number of fixed parameters, including optionals. That argument must be stored in the same-named member of the function structure.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 4906032e..8499ff98 100644
--- a/lib.c
+++ b/lib.c
@@ -6009,7 +6009,7 @@ val func_vm(val closure, val desc, int fixparam, int reqargs, int variadic)
obj->f.functype = FVM;
obj->f.env = closure;
obj->f.f.vm_desc = desc;
- obj->f.fixparam = reqargs;
+ obj->f.fixparam = fixparam;
obj->f.optargs = fixparam - reqargs;
obj->f.variadic = variadic;
return obj;