mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 00:57:11 -04:00
Unstuffing pattern length of zero should never match.
This commit is contained in:
parent
05badaddda
commit
a00fcbaa8f
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,8 @@ public:
|
||||||
const uint32_t pattern,
|
const uint32_t pattern,
|
||||||
const size_t length
|
const size_t length
|
||||||
) {
|
) {
|
||||||
match = pattern;
|
// Ensure that length=0 (unstuffing disabled) never matches.
|
||||||
|
match = length ? pattern : 1;
|
||||||
mask = (1U << length) - 1;
|
mask = (1U << length) - 1;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue