mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-21 10:05:04 +01:00
Bug in mtrie fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
06bdf2c4f9
commit
5936379b29
@ -228,14 +228,14 @@ void zmq::mtrie_t::match_helper (unsigned char *data_, size_t size_,
|
|||||||
|
|
||||||
// If there's one subnode (optimisation).
|
// If there's one subnode (optimisation).
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
next.node->match (data_ + 1, size_ - 1, func_, arg_);
|
if (min == data_ [0])
|
||||||
|
next.node->match_helper (data_ + 1, size_ - 1, func_, arg_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there are multiple subnodes.
|
// If there are multiple subnodes.
|
||||||
for (unsigned char c = 0; c != count; c++) {
|
if (next.table [data_ [0] - min])
|
||||||
if (next.table [c])
|
next.table [data_ [0] - min]->match_helper (data_ + 1, size_ - 1,
|
||||||
next.table [c]->match (data_ + 1, size_ - 1, func_, arg_);
|
func_, arg_);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user