# HG changeset patch # User Benjamin Kramer # Date 1250934320 -7200 # Node ID 72f00d740665bf39ff7ec944f1e4639492f49d78 # Parent 3a08f5e2553b6ac5911c5b44be801198798c990a Fix bug #356. Our sorting function was wrong if a value was between two NULL pointers. diff -r 3a08f5e2553b -r 72f00d740665 ir/irtypestruct.cpp --- 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