PrintAndLog("Invalid char on input");
return 0;
}
+ if (datalen == 0)
+ {
+ PrintAndLog("Missing data input");
+ return 0;
+ }
if(crc)
{
uint8_t first, second;
if (hexout != NULL) {
uint8_t first, second;
for (int i = 0; i < resp.arg[0]; i++) { // data in hex
- sprintf(&hexout[i * 3], "%02hX ", recv[i]);
+ sprintf(&hexout[i * 3], "%02X ", recv[i]);
}
PrintAndLog("%s", hexout);
free(hexout);