mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02: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:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user