Blender Git Loki
Git Commits -> Revision 120427e
Revision 120427e by Ton Roosendaal (master) July 14, 2005, 13:12 (GMT) |
Fix for a *very* nasty bug... somewhere in the ancient past - I tracked it back to 1.4 - comparing pointers apparently gave warnings or errors... I don't really have a memory of that. Could be the Irix compiler. What it was used for is sorting edges in arrays or hash lists, like: if( ((long)v1) > ((long)v2) ) long is defined to be pointer size, so that should work 32/64 bits, where it not that the long cast makes the value SIGNED! :) Ken Hughes discovered this... noting that when his system uses a calloc, the returned pointer had an uncommon address making the long negative. It was a very hard bug to track, since (apparently) most OS's have an address space being still in the lower part of an long... Anyhoo; I have removed a couple of (long) casts from pointer comparing now, need to get compile feedback if that's compliant for all our OS's. If so, quite a lot of such hacks have to be removed from our code, or make them casting to an unsigned long... This has been confirmed to fix bugs #2709 and #2710. Thanks Ken! |
Commit Details:
Full Hash: 120427e96b0b1599a3d4fb2ce3b5b18eb3525fa0
SVN Revision: 4721
Parent Commit: e5a639a
Lines Changed: +7, -7