]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14b.c
Fixed issue with binary files in windows, http://www.lua.org/pil/21.2.2.html
[proxmark3-svn] / client / cmdhf14b.c
index 7694c2cd3a7399898db88278a3c8174b9ef42bec..6696ac0947f2fab7a1d62566ab40b09ca0707ee9 100644 (file)
@@ -334,6 +334,11 @@ int CmdHF14BCmdRaw (const char *cmd) {
         PrintAndLog("Invalid char on input");
         return 0;
     }
+    if (datalen == 0)
+    {
+      PrintAndLog("Missing data input");
+      return 0;
+    }
     if(crc)
     {
         uint8_t first, second;
@@ -359,7 +364,7 @@ int CmdHF14BCmdRaw (const char *cmd) {
             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);
Impressum, Datenschutz