mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
data scale: check param
This commit is contained in:
parent
2d15fde0a8
commit
e41efe192b
1 changed files with 3 additions and 3 deletions
|
@ -1916,9 +1916,9 @@ static int CmdScale(const char *Cmd) {
|
|||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||
CursorScaleFactor = arg_get_dbl_def(ctx, 1, 0);
|
||||
if (CursorScaleFactor == 0) {
|
||||
PrintAndLogEx(FAILED, "bad, can't have zero scale");
|
||||
CursorScaleFactor = arg_get_dbl_def(ctx, 1, 1);
|
||||
if (CursorScaleFactor <= 0) {
|
||||
PrintAndLogEx(FAILED, "bad, can't have negative or zero scale");
|
||||
CursorScaleFactor = 1;
|
||||
}
|
||||
int len = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue