diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib_ffi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib_ffi.c b/src/lib_ffi.c index 931164b7..c74b497a 100644 --- a/src/lib_ffi.c +++ b/src/lib_ffi.c | |||
| @@ -284,7 +284,10 @@ LJLIB_CF(ffi_meta___tostring) | |||
| 284 | } else { | 284 | } else { |
| 285 | CTState *cts = ctype_cts(L); | 285 | CTState *cts = ctype_cts(L); |
| 286 | CType *ct = ctype_raw(cts, id); | 286 | CType *ct = ctype_raw(cts, id); |
| 287 | if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct); | 287 | if (ctype_isref(ct->info)) { |
| 288 | p = *(void **)p; | ||
| 289 | ct = ctype_rawchild(cts, ct); | ||
| 290 | } | ||
| 288 | if (ctype_iscomplex(ct->info)) { | 291 | if (ctype_iscomplex(ct->info)) { |
| 289 | setstrV(L, L->top-1, lj_ctype_repr_complex(L, cdataptr(cd), ct->size)); | 292 | setstrV(L, L->top-1, lj_ctype_repr_complex(L, cdataptr(cd), ct->size)); |
| 290 | goto checkgc; | 293 | goto checkgc; |
