[physfs] lzma.c msvc, etc. patch
devurandom at gmx.net
Sat Feb 2 04:53:59 EST 2008
Am Samstag, 2. Februar 2008 08:03:03 schrieb Sean Ridenour:
> Isn't casting a void pointer to an unsigned long going to create 64-bit
> portability problems? From what I understand, even on 64-bit x86 CPUs a
> long is only 32 bits wide, whereas a void pointer will be 64 bits. If true,
> there'll be data loss casting a void pointer to an unsigned long.
The length of pointers and longs is afaik set by the compiler, not the
But indeed, MSVC has 32bit longs and 64bit pointers.
An uintptr_t should be used instead.
(I even imagined that pointer arithmetic is completely legal in C... No idea
about C++ though.)
I'd have fixed the NULL file by simply doing the increment later, while
leaving the initialisation as is (except the +1)... if(dlen > 0) file++;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the physfs