diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-15 21:18:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-15 21:18:31 -0700 |
commit | 302b8eebfa15bbcfaef722ff951615690368e947 (patch) | |
tree | fb6f08f0c2000201e6dd39e77659be14d118bbf6 | |
parent | 0b24196d17cb5b0be31d0201497da09b95a5a1b8 (diff) | |
download | txr-302b8eebfa15bbcfaef722ff951615690368e947.tar.gz txr-302b8eebfa15bbcfaef722ff951615690368e947.tar.bz2 txr-302b8eebfa15bbcfaef722ff951615690368e947.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.
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |