mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +01:00
Sort extensions properly
Just taking the difference of the priorities has overflow issues, as pointed out in bug 623069.
This commit is contained in:
parent
42080449d0
commit
4e5532ec51
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user