diff options
Diffstat (limited to 'src/lj_crecord.c')
-rw-r--r-- | src/lj_crecord.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 86e95679..61210907 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -483,7 +483,10 @@ void LJ_FASTCALL recff_cdata_index(jit_State *J, RecordFFData *rd) | |||
483 | #endif | 483 | #endif |
484 | integer_key: | 484 | integer_key: |
485 | if (ctype_ispointer(ct->info)) { | 485 | if (ctype_ispointer(ct->info)) { |
486 | CTSize sz = lj_ctype_size(cts, (sid = ctype_cid(ct->info))); | 486 | CTSize sz; |
487 | if ((ct->info & CTF_COMPLEX)) | ||
488 | idx = emitir(IRT(IR_BAND, IRT_INTP), idx, lj_ir_kintp(J, 1)); | ||
489 | sz = lj_ctype_size(cts, (sid = ctype_cid(ct->info))); | ||
487 | idx = crec_reassoc_ofs(J, idx, &ofs, sz); | 490 | idx = crec_reassoc_ofs(J, idx, &ofs, sz); |
488 | idx = emitir(IRT(IR_MUL, IRT_INTP), idx, lj_ir_kintp(J, sz)); | 491 | idx = emitir(IRT(IR_MUL, IRT_INTP), idx, lj_ir_kintp(J, sz)); |
489 | ptr = emitir(IRT(IR_ADD, IRT_PTR), idx, ptr); | 492 | ptr = emitir(IRT(IR_ADD, IRT_PTR), idx, ptr); |