]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: minor fixes in setting arrays and error messages.
authoriceman1001 <iceman@iuse.se>
Thu, 2 Feb 2017 14:39:35 +0000 (15:39 +0100)
committericeman1001 <iceman@iuse.se>
Thu, 2 Feb 2017 14:39:35 +0000 (15:39 +0100)
client/cmdlfcotag.c

index 8b71a0318368e771ee44ca0c643ee470439a7354..ef935bb0daf737081682f754213e0717a79a899c 100644 (file)
@@ -59,18 +59,18 @@ int CmdCOTAGRead(const char *Cmd) {
                        GetFromBigBuf(bits, sizeof(bits), 0);
                        UsbCommand response;
                        if ( !WaitForResponseTimeout(CMD_ACK, &response, 500) ) {
-                                       PrintAndLog("timeout while waiting for reply.");
-                                       return 1;
+                               if (g_debugMode) PrintAndLog("timeout while waiting for reply.");
+                               return 1;
                        }
                        
                        size_t size = sizeof(bits);
                        int err = manrawdecode(bits, &size, 1);
                        if (err){
-                               PrintAndLog("DEBUG: Error - COTAG too many errors: %d", err);
+                               if (g_debugMode) PrintAndLog("DEBUG: Error - COTAG too many errors: %d", err);
                                return 0;
                        }
                        PrintAndLog("%s", sprint_bin(bits, size));
-                       setDemodBuf(bits, sizeof(bits), 0);
+                       setDemodBuf(bits, size, 0);
                        
                        // CmdCOTAGDemod();
                        break;
Impressum, Datenschutz