0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Bug in subscription matching fixed (issue 263)

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Martin Sustrik 2011-09-29 11:35:31 +02:00
parent 34b114d15d
commit 7a10bbe77a

View File

@ -236,11 +236,12 @@ void zmq::mtrie_t::match (unsigned char *data_, size_t size_,
}
// If there are multiple subnodes.
if (data_ [0] < min || data_ [0] >= min + count)
if (data_ [0] < current->min || data_ [0] >=
current->min + current->count)
break;
if (!current->next.table [data_ [0] - min])
if (!current->next.table [data_ [0] - current->min])
break;
current = current->next.table [data_ [0] - min];
current = current->next.table [data_ [0] - current->min];
data_++;
size_--;
}