cliparser doesnt liek empty strings, should be NULL instead

This commit is contained in:
iceman1001 2021-04-19 22:47:20 +02:00
commit 150579f375
2 changed files with 4 additions and 3 deletions

View file

@ -1800,11 +1800,12 @@ static int CmdSamples(const char *Cmd) {
CLIParserInit(&ctx, "data samples",
"Get raw samples for graph window (GraphBuffer) from device.\n"
"If 0, then get whole big buffer from device.",
"data samples"
"data samples\n"
"data samples -n 10000"
);
void *argtable[] = {
arg_param_begin,
arg_int0("n", "", "<dec>", "num of samples (512 - 40000)"),
arg_int0("n", NULL, "<dec>", "num of samples (512 - 40000)"),
arg_lit0("v", "verbose", "verbose"),
arg_param_end
};

View file

@ -1428,7 +1428,7 @@ int CmdEM4x05Brute(const char *Cmd) {
void *argtable[] = {
arg_param_begin,
arg_u64_0("s", "start", "<pwd>", "Start bruteforce enumeration from this password value"),
arg_int0("n", "", "<digits>", "Stop after having found n candidates. Default: 0 => infinite"),
arg_int0("n", NULL, "<digits>", "Stop after having found n candidates. Default: 0 => infinite"),
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);