mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-28 19:31:19 +08:00
Fix lf em 410x watch and standalone bug introduced with Electra changes
This commit is contained in:
parent
9e57d20262
commit
2ce30201b2
2 changed files with 46 additions and 44 deletions
|
@ -98,7 +98,7 @@ static uint32_t IceEM410xdemod(void) {
|
|||
|
||||
int type = Em410xDecode(dest, &size, &idx, &hi, &lo);
|
||||
// Did we find a Short EM or a Long EM?
|
||||
if ((type & (0x1 | 0x2)) == 0) {
|
||||
if ((type < 0) || ((type & (0x1 | 0x2)) == 0)) {
|
||||
BigBuf_free();
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
|
|
@ -1477,6 +1477,7 @@ int lf_em410x_watch(int findone, uint32_t *high, uint64_t *low) {
|
|||
WDT_HIT();
|
||||
|
||||
int type = Em410xDecode(dest, &size, &idx, &hi, &lo);
|
||||
if (type > 0) {
|
||||
if (type & 0x1) {
|
||||
Dbprintf("EM TAG ID: " _GREEN_("%02x%08x") " - ( %05d_%03d_%08d )",
|
||||
(uint32_t)(lo >> 32),
|
||||
|
@ -1517,11 +1518,12 @@ int lf_em410x_watch(int findone, uint32_t *high, uint64_t *low) {
|
|||
(uint32_t)data);
|
||||
}
|
||||
}
|
||||
if ((type > 0) && findone) {
|
||||
if (findone) {
|
||||
*high = hi;
|
||||
*low = lo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
hi = lo = size = idx = 0;
|
||||
clk = invert = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue