Fixed broken ternary logic in GenericAttributeText::Compare() that would result in the wrong value being returned when one or both attributes being compared were undefined. A symptom of this was the crash reported in ticket #2760. Leaving that ticket open for now though as returning the wrong value to the sort shouldn't have caused a crash regardless.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28871 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f861e599f5
commit
6d344473e6
@ -1469,7 +1469,7 @@ GenericAttributeText::Compare(WidgetAttributeText &attr, BPoseView *)
|
||||
// Sort undefined values last, regardless of the other value:
|
||||
if (fValueIsDefined == false || compareTo->fValueIsDefined == false) {
|
||||
return fValueIsDefined < compareTo->fValueIsDefined ?
|
||||
(fValueIsDefined == compareTo->fValueIsDefined ? 0 : -1) : 1;
|
||||
1 : (fValueIsDefined == compareTo->fValueIsDefined ? 0 : -1);
|
||||
}
|
||||
|
||||
switch (fColumn->AttrType()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user