summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mtrie.cpp7
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_--;
}