jmckaskill / luaffi

Standalone FFI library for calling C functions from lua. Compatible with the luajit FFI interface.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tonumber(uintptr_t) returns negative value.

moteus opened this issue · comments

WinXP(x86) MSVC10 Express.

ffi = require "ffi"
uintptr_t = ffi.typeof("uintptr_t")
v = ffi.new(uintptr_t, 0xFFFFFFFF)
print(tonumber(v))

prints -1