This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LUA : An easy way to separate an int64 into two int32 ?
#6
Hi,

And if you ever need to do a split with a 8 byte value into 2x 4 bytes you can do it like this:
Code:
value = 0xffffffff
high32 = bit.rshift(bit.band(value,0xffff0000),16)
low32 = bit.band(value,0x0000ffff)
BR,

Erwin
Reply


Messages In This Thread
RE: LUA : An easy way to separate an int64 into two int32 ? - by Erwin van der Zwart - 05.08.2020, 10:22

Forum Jump: