mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-21 07:46:12 +08:00
Merge pull request #2271 from lnv42/master
cmdhf15: fix sanity checks (uidlen alone is > 1 when -u is set)
This commit is contained in:
commit
7afe2dab8c
|
@ -936,7 +936,7 @@ static int CmdHF15Info(const char *Cmd) {
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if ((scan + unaddressed + uidlen) > 1) {
|
if ((scan + unaddressed + (uidlen > 0)) > 1) {
|
||||||
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
@ -1639,7 +1639,7 @@ static int CmdHF15WriteDsfid(const char *Cmd) {
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if ((scan + unaddressed + uidlen) > 1) {
|
if ((scan + unaddressed + (uidlen > 0)) > 1) {
|
||||||
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
@ -2588,7 +2588,7 @@ static int CmdHF15Restore(const char *Cmd) {
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if ((scan + unaddressed + uidlen) > 1) {
|
if ((scan + unaddressed + (uidlen > 0)) > 1) {
|
||||||
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue