Fix priority order.

This commit is contained in:
Karamel 2017-08-30 11:05:52 +02:00
parent 933bc27258
commit 4a77f140bb

@ -198,7 +198,7 @@ function poschangelib.register_stomp(source_node_name, stomp_node_name, stomp_de
local inserted = false
local i = 1
-- insert while keeping ascending priority order
while i < #stomps[source_node_name] and not inserted do
while i <= #stomps[source_node_name] and not inserted do
if stomps[source_node_name][i].priority > stomp_desc.priority then
table.insert(stomps[source_node_name], i, stomp_desc)
inserted = true