[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible Bug in bitlib under Windows?
- From: KHMan <keinhong@...>
- Date: Fri, 12 Dec 2008 14:51:10 +0800
Ralph Hempel wrote:
Andrew Gorges wrote:
-- displays 0
What does bit.band( 3, 1 ) result in?
Are we seeing the result of truncation and endianness issues
of what we assume is a 32 bit value that is actually a 64
bit value when compiled?
Just got a copy of Lfw 184.108.40.206. The problem is probably in
TOBIT() in lbitlib.c. It looks rather complex, I haven't tried
picking it apart yet...
Using bit.cast to test TOBIT() by itself:
Which is supposed to be -1 with 32-bit ints. 0xffffffff is
correctly represented in Lua, since:
So, something wrong is happening when TOBIT() tries to convert the
double to an integer.
BTW, I think the LfW page should also point to the Google project
for regular downloads, since it is much faster.
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia