FFI: Fix argument checks for ffi.string().

This commit is contained in:
Mike Pall
2013-09-08 03:09:39 +02:00
parent b6ec7c7c86
commit 93c2b939bd
2 changed files with 2 additions and 2 deletions

View File

@@ -1514,7 +1514,7 @@ void LJ_FASTCALL recff_ffi_string(jit_State *J, RecordFFData *rd)
TRef tr = J->base[0];
if (tr) {
TRef trlen = J->base[1];
if (trlen) {
if (!tref_isnil(trlen)) {
trlen = crec_toint(J, cts, trlen, &rd->argv[1]);
tr = crec_ct_tv(J, ctype_get(cts, CTID_P_CVOID), 0, tr, &rd->argv[0]);
} else {