mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
FIXED: Merged all Holimans code-review issues which should fix a lot of memoryleaks.
This commit is contained in:
parent
7c756d6892
commit
a61b4976bd
18 changed files with 142 additions and 137 deletions
25
client/ui.c
25
client/ui.c
|
@ -152,30 +152,13 @@ int manchester_decode( int * data, const size_t len, uint8_t * dataout, size_t
|
|||
lastpeak = i;
|
||||
}
|
||||
}
|
||||
//return clock;
|
||||
//defaults clock to precise values.
|
||||
switch(clock){
|
||||
case 8:
|
||||
case 16:
|
||||
case 32:
|
||||
case 40:
|
||||
case 50:
|
||||
case 64:
|
||||
case 100:
|
||||
case 128:
|
||||
return clock;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
//PrintAndLog(" Found Clock : %d - trying to adjust", clock);
|
||||
|
||||
// When detected clock is 31 or 33 then then return
|
||||
int clockmod = clock%8;
|
||||
if ( clockmod == 7 )
|
||||
clock += 1;
|
||||
else if ( clockmod == 1 )
|
||||
clock -= 1;
|
||||
if ( clockmod == 0) return clock;
|
||||
|
||||
if ( clockmod == 7 ) clock += 1;
|
||||
else if ( clockmod == 1 ) clock -= 1;
|
||||
|
||||
return clock;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue