diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_crecord.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 3f3552a6..2fcc6d1c 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -1396,9 +1396,13 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd) | |||
1396 | if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); | 1396 | if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); |
1397 | goto ok; | 1397 | goto ok; |
1398 | } else if (ctype_isfunc(ct->info)) { | 1398 | } else if (ctype_isfunc(ct->info)) { |
1399 | CTypeID id0 = i ? ctype_typeid(cts, s[0]) : 0; | ||
1399 | tr = emitir(IRT(IR_FLOAD, IRT_PTR), tr, IRFL_CDATA_PTR); | 1400 | tr = emitir(IRT(IR_FLOAD, IRT_PTR), tr, IRFL_CDATA_PTR); |
1400 | ct = ctype_get(cts, | 1401 | ct = ctype_get(cts, |
1401 | lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR)); | 1402 | lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR)); |
1403 | if (i) { | ||
1404 | s[0] = ctype_get(cts, id0); /* cts->tab may have been reallocated. */ | ||
1405 | } | ||
1402 | goto ok; | 1406 | goto ok; |
1403 | } else { | 1407 | } else { |
1404 | tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCcdata))); | 1408 | tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCcdata))); |