Mercurial > projects > ldc
changeset 1574:72f00d740665
Fix bug #356. Our sorting function was wrong if a value was between two NULL pointers.
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Sat, 22 Aug 2009 11:45:20 +0200 |
parents | 3a08f5e2553b |
children | 299a6b634178 |
files | ir/irtypestruct.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ir/irtypestruct.cpp Mon Aug 17 13:42:19 2009 -0600 +++ b/ir/irtypestruct.cpp Sat Aug 22 11:45:20 2009 +0200 @@ -67,8 +67,8 @@ { if (v1 && v2) return v1->offset < v2->offset; - else - return false; + // sort NULL pointers towards the end + return v1 && !v2; } // this is pretty much the exact same thing we need to do for fields in each