From 4dfcd44edd8782969d80971eb891585f82c00b2e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 20 Nov 2022 16:43:12 +0100 Subject: [PATCH] return default value when arg is not enforced with u32_1 --- client/src/cmdhw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index 4962edfe2..f10fa8330 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -763,7 +763,7 @@ static int CmdStandalone(const char *Cmd) { arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); - uint8_t arg = arg_get_u32(ctx, 1); + uint8_t arg = arg_get_u32_def(ctx, 1, 1); CLIParserFree(ctx); clearCommandBuffer(); SendCommandNG(CMD_STANDALONE, (uint8_t *)&arg, sizeof(arg)); @@ -938,7 +938,7 @@ static int CmdPing(const char *Cmd) { arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); - uint32_t len = arg_get_u32(ctx, 1); + uint32_t len = arg_get_u32_def(ctx, 1, 32); CLIParserFree(ctx); if (len > PM3_CMD_DATA_SIZE)