hook: Use old insertion order for equal priority

This commit is contained in:
Ed Kellett 2020-04-27 16:36:40 +01:00
parent c500b0bdb5
commit c6b2dacad4
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -201,7 +201,7 @@ add_hook_prio(const char *name, hookfn fn, enum hook_priority priority)
RB_DLINK_FOREACH(ptr, hooks[i].hooks.head)
{
struct hook_entry *o = ptr->data;
if (entry->priority < o->priority)
if (entry->priority <= o->priority)
{
rb_dlinkAddBefore(ptr, entry, &entry->node, &hooks[i].hooks);
return;