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 | 725338a17056b5a71ad8f3bb687fb899206a0c31 (patch) | |
tree | 1cf356115899d0ebfacfe20270bc470665c3de7d | |
parent | c2fd426c4b57d61911e3c3c89a99eb17a90a5ba8 (diff) | |
download | txr-725338a17056b5a71ad8f3bb687fb899206a0c31.tar.gz txr-725338a17056b5a71ad8f3bb687fb899206a0c31.tar.bz2 txr-725338a17056b5a71ad8f3bb687fb899206a0c31.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); + } } } |