lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I try to send a 32 bits uint32_t value from LUA to C (ie in fact a 0xRRGGBBAA pattern) and i am facing the following issue :
  • If i do a 0xFF0000FF -> I get the value 0x80000000 with luaL_checkinteger()
  • If i do not set the MSB (ie 0x7F0000FF for example) -> I get the correct value  with luaL_checkinteger()
I guess it has something to do with sign conversion, but i do not know if it is a bug or a normal behavior with luaJIT.

Any hint or idea ?

Best rgds,
SF.

-- 
=================================
Sylvain FABRE
sylvain.fabre@inpixal.com
Fixe: 09 72 11 30 24
Mobile: 06 30 12 72 34
Fax : 09 72 11 10 71
=================================