[Gtkradiant] Bug with libs/ddslib/ddslib.c lines 693 to 723 on 64 bit systems.

Forest Hale lordhavoc at ghdigital.com
Thu Jan 17 07:37:29 CST 2008

Jay Dolan wrote:
> Forest Hale wrote:
>> All pointers are always the same size on a given architecture, the bug is somewhere else (possibly in the dds width/height reading for example?).
>> Note that sizeof(size_t) is always equal to sizeof(void *), size_t is the correct type to use when pointer-size integer arithmetic is needed.
> I thought ptrdiff_t was recommended for such things.  Same-same, maybe?

ptrdiff_t is not part of ANSI C, so you can't count on it existing, if I recall correctly MSVS2005 lacks it but I may be thinking of older versions.

The other difference is that ptrdiff_t is signed, size_t is unsigned.

Author of DarkPlaces Quake1 engine and mod
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass

More information about the Gtkradiant mailing list