mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-04 07:11:10 +08:00
fix in nr demodulation , which fixes a crash in "lf em 4x05 info"
This commit is contained in:
parent
160941c280
commit
a9aea6c726
1 changed files with 7 additions and 2 deletions
|
@ -1720,8 +1720,13 @@ int askdemod_ext(uint8_t *bits, size_t *size, int *clk, int *invert, int maxErr,
|
|||
} else if (bits[i] <= low) {
|
||||
bits[bitnum++] = *invert ^ 1;
|
||||
} else if (i - lastBit >= *clk / 2 + tol) {
|
||||
bits[bitnum] = bits[bitnum - 1];
|
||||
bitnum++;
|
||||
if (bitnum > 0) {
|
||||
bits[bitnum] = bits[bitnum - 1];
|
||||
bitnum++;
|
||||
} else {
|
||||
bits[bitnum] = 0;
|
||||
bitnum++;
|
||||
}
|
||||
} else { //in tolerance - looking for peak
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue