hook: Use old insertion order for equal priority
This commit is contained in:
parent
c500b0bdb5
commit
c6b2dacad4
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ add_hook_prio(const char *name, hookfn fn, enum hook_priority priority)
|
||||||
RB_DLINK_FOREACH(ptr, hooks[i].hooks.head)
|
RB_DLINK_FOREACH(ptr, hooks[i].hooks.head)
|
||||||
{
|
{
|
||||||
struct hook_entry *o = ptr->data;
|
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);
|
rb_dlinkAddBefore(ptr, entry, &entry->node, &hooks[i].hooks);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue