diff options
-rw-r--r-- | src/mtrie.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mtrie.cpp b/src/mtrie.cpp index 01c4fc5..66bea20 100644 --- a/src/mtrie.cpp +++ b/src/mtrie.cpp @@ -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_--; } |