aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_ffrecord.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c
index 849d7a27..cb374beb 100644
--- a/src/lj_ffrecord.c
+++ b/src/lj_ffrecord.c
@@ -949,7 +949,8 @@ static void LJ_FASTCALL recff_string_find(jit_State *J, RecordFFData *rd)
949 str->len-(MSize)start, pat->len)) { 949 str->len-(MSize)start, pat->len)) {
950 TRef pos; 950 TRef pos;
951 emitir(IRTG(IR_NE, IRT_PGC), tr, trp0); 951 emitir(IRTG(IR_NE, IRT_PGC), tr, trp0);
952 pos = emitir(IRTI(IR_SUB), tr, emitir(IRT(IR_STRREF, IRT_PGC), trstr, tr0)); 952 /* Don't use STRREF of trstr. We need a pointer diff. */
953 pos = emitir(IRTI(IR_SUB), emitir(IRTI(IR_SUB), tr, trstr), lj_ir_kint(J, sizeof(GCstr)));
953 J->base[0] = emitir(IRTI(IR_ADD), pos, lj_ir_kint(J, 1)); 954 J->base[0] = emitir(IRTI(IR_ADD), pos, lj_ir_kint(J, 1));
954 J->base[1] = emitir(IRTI(IR_ADD), pos, trplen); 955 J->base[1] = emitir(IRTI(IR_ADD), pos, trplen);
955 rd->nres = 2; 956 rd->nres = 2;