diff --git a/src/lj_cconv.c b/src/lj_cconv.c index de4938e4..90cd36e3 100644 --- a/src/lj_cconv.c +++ b/src/lj_cconv.c @@ -702,6 +702,7 @@ static void cconv_substruct_init(CTState *cts, CType *d, uint8_t *dp, } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) { cconv_substruct_init(cts, ctype_rawchild(cts, df), dp+df->size, o, len, ip); + if ((d->info & CTF_UNION)) break; } /* Ignore all other entries in the chain. */ } } diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 4e64f431..acd786f5 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -1466,6 +1466,7 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd) } } else if (!tref_isnum(tr)) { tr = 0; + ct = ctype_get(cts, CTID_P_VOID); } ok: s[i] = ct;