Unstuffing pattern length of zero should never match.

This commit is contained in:
Jared Boone 2015-09-26 14:37:21 -07:00
parent 05badaddda
commit a00fcbaa8f

View File

@ -50,7 +50,8 @@ public:
const uint32_t pattern,
const size_t length
) {
match = pattern;
// Ensure that length=0 (unstuffing disabled) never matches.
match = length ? pattern : 1;
mask = (1U << length) - 1;
reset();
}