mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
FFI: Fix __tostring metamethod access to enum cdata value.
Thanks to Sergey Kaplun. #1232
This commit is contained in:
parent
0f8b878e2f
commit
f2a1cd4328
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user