diff --git a/src/lib_ffi.c b/src/lib_ffi.c index cf9cf9f5..1422dea6 100644 --- a/src/lib_ffi.c +++ b/src/lib_ffi.c @@ -304,7 +304,7 @@ LJLIB_CF(ffi_meta___tostring) p = *(void **)p; } else if (ctype_isenum(ct->info)) { msg = "cdata<%s>: %d"; - p = (void *)(uintptr_t)*(uint32_t **)p; + p = (void *)(uintptr_t)*(uint32_t *)p; } else { if (ctype_isptr(ct->info)) { p = cdata_getptr(p, ct->size);