aboutsummaryrefslogtreecommitdiff
path: root/src/lib_ffi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib_ffi.c')
-rw-r--r--src/lib_ffi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib_ffi.c b/src/lib_ffi.c
index f61fabc0..4503875a 100644
--- a/src/lib_ffi.c
+++ b/src/lib_ffi.c
@@ -657,7 +657,7 @@ LJLIB_CF(ffi_string) LJLIB_REC(.)
657 TValue *o = lj_lib_checkany(L, 1); 657 TValue *o = lj_lib_checkany(L, 1);
658 const char *p; 658 const char *p;
659 size_t len; 659 size_t len;
660 if (o+1 < L->top) { 660 if (o+1 < L->top && !tvisnil(o+1)) {
661 len = (size_t)ffi_checkint(L, 2); 661 len = (size_t)ffi_checkint(L, 2);
662 lj_cconv_ct_tv(cts, ctype_get(cts, CTID_P_CVOID), (uint8_t *)&p, o, 662 lj_cconv_ct_tv(cts, ctype_get(cts, CTID_P_CVOID), (uint8_t *)&p, o,
663 CCF_ARG(1)); 663 CCF_ARG(1));