data scale: check param
This commit is contained in:
@@ -1916,9 +1916,9 @@ static int CmdScale(const char *Cmd) {
|
|||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||||
CursorScaleFactor = arg_get_dbl_def(ctx, 1, 0);
|
CursorScaleFactor = arg_get_dbl_def(ctx, 1, 1);
|
||||||
if (CursorScaleFactor == 0) {
|
if (CursorScaleFactor <= 0) {
|
||||||
PrintAndLogEx(FAILED, "bad, can't have zero scale");
|
PrintAndLogEx(FAILED, "bad, can't have negative or zero scale");
|
||||||
CursorScaleFactor = 1;
|
CursorScaleFactor = 1;
|
||||||
}
|
}
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user