mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 01:36:52 +08:00
Limit hexsamples to just the amount of requested samples
This commit is contained in:
parent
68d9d60a4d
commit
78d647da02
1 changed files with 8 additions and 0 deletions
|
@ -909,9 +909,12 @@ static void CmdHexsamples(char *str)
|
|||
{
|
||||
int i;
|
||||
int n;
|
||||
int requested = atoi(str);
|
||||
int delivered = 0;
|
||||
|
||||
if(atoi(str) == 0) {
|
||||
n = 12;
|
||||
requested = 12;
|
||||
} else {
|
||||
n = atoi(str)/4;
|
||||
}
|
||||
|
@ -939,7 +942,12 @@ static void CmdHexsamples(char *str)
|
|||
c.d.asBytes[j+7],
|
||||
c.d.asBytes[j+8]
|
||||
);
|
||||
delivered += 8;
|
||||
if(delivered >= requested)
|
||||
break;
|
||||
}
|
||||
if(delivered >= requested)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue