Fix LocaleRosterData::CompareInfos.
* The given void pointers are pointers to the actual list items, which are pointers themselves, so there was an indirection missing * Fix inverted sort order This could have caused spurious crashes related to initialization of the locale kit, most notably this was responsible for triggering a crashing bug in the plaintext add-on that caused the x86 image not being able to boot. I will continue with trying to find the actual crash, too.
This commit is contained in:
parent
8cb3428017
commit
735ec4d986
@ -165,8 +165,12 @@ LocaleRosterData::Refresh()
|
|||||||
int
|
int
|
||||||
LocaleRosterData::CompareInfos(const void* left, const void* right)
|
LocaleRosterData::CompareInfos(const void* left, const void* right)
|
||||||
{
|
{
|
||||||
return ((CatalogAddOnInfo*)right)->fPriority
|
const CatalogAddOnInfo* leftInfo
|
||||||
- ((CatalogAddOnInfo*)left)->fPriority;
|
= * static_cast<const CatalogAddOnInfo* const *>(left);
|
||||||
|
const CatalogAddOnInfo* rightInfo
|
||||||
|
= * static_cast<const CatalogAddOnInfo* const *>(right);
|
||||||
|
|
||||||
|
return leftInfo->fPriority - rightInfo->fPriority;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user