// convertors
int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen) {
+ *datalen = 0;
+ if (!strlen(argstr->sval[0]))
+ return 0;
+
switch(param_gethex_to_eol(argstr->sval[0], 0, data, maxdatalen, datalen)) {
case 1:
printf("Parameter error: Invalid HEX value.\n");
bool leaveSignalON = arg_get_lit(2);
bool APDULogging = arg_get_lit(3);
bool decodeTLV = arg_get_lit(4);
- if (arg_get_str_len(5))
- CLIGetStrBLessWithReturn(5, data, &datalen, 0);
+ CLIGetStrBLessWithReturn(5, data, &datalen, 0);
CLIParserFree();
SetAPDULogging(APDULogging);