mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-05-02 22:20:46 +00:00
Unstuffing pattern length of zero should never match.
This commit is contained in:
parent
05badaddda
commit
a00fcbaa8f
@ -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…
x
Reference in New Issue
Block a user