Sort extensions properly

Just taking the difference of the priorities has overflow issues,
as pointed out in bug 623069.
This commit is contained in:
Matthias Clasen 2010-09-03 19:03:34 -04:00
parent 42080449d0
commit 4e5532ec51

View File

@ -791,7 +791,13 @@ extension_prio_compare (gconstpointer a,
{
const GIOExtension *extension_a = a, *extension_b = b;
return extension_b->priority - extension_a->priority;
if (extension_a->priority > extension_b->priority)
return -1;
if (extension_b->priority > extension_a->priority)
return 1;
return 0;
}
/**