diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-06 07:22:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-06 07:22:49 -0800 |
commit | 0a9221983c5229fb9a2159592ca92d753e19693e (patch) | |
tree | 1cf356115899d0ebfacfe20270bc470665c3de7d | |
parent | e86704accbf48510cd11734ff5a87c072a7035a6 (diff) | |
download | txr-0a9221983c5229fb9a2159592ca92d753e19693e.tar.gz txr-0a9221983c5229fb9a2159592ca92d753e19693e.tar.bz2 txr-0a9221983c5229fb9a2159592ca92d753e19693e.zip |
ffi: make-zstruct must ignore padding slots.
* ffi.c (make_zstruct): Don't convert zeros to a Lisp type and
don't try to set the slot, if the slot name is nil. That's a
padding slot which doesn't exist in the Lisp type; the slotset
will blow up on it.
-rw-r--r-- | ffi.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -5369,8 +5369,10 @@ val make_zstruct(val type, struct args *args) if (!inited[i]) { struct smemb *m = &tft->memb[i]; val slsym = m->mname; - val initval = m->mtft->get(m->mtft, zbuf, self); - slotset(strct, slsym, initval); + if (slsym) { + val initval = m->mtft->get(m->mtft, zbuf, self); + slotset(strct, slsym, initval); + } } } |