FFI: Fix cdata equality comparison against strings.

This commit is contained in:
Mike Pall
2014-04-08 12:10:51 +02:00
parent 111b2e8711
commit 4ed3ee1f04
2 changed files with 5 additions and 3 deletions

View File

@@ -1421,7 +1421,9 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd)
ct = ctype_child(cts, cct);
tr = lj_ir_kint(J, (int32_t)ofs);
} /* else: interpreter will throw. */
} /* else: interpreter will throw. */
} else {
tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCstr)));
}
} else if (!tref_isnum(tr)) {
tr = 0;
}