]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfhitag.c
CHG: Remake the "hf mf chkkeys" It now prints the found keys like "hf mf nested...
[proxmark3-svn] / client / cmdlfhitag.c
index 36220643d3b6ab0e4819ea0feedd9c4cce52ca22..81822eb69875c162c8dae4da20c6198ffe0569a7 100644 (file)
@@ -71,7 +71,7 @@ int CmdLFHitagList(const char *Cmd)
 
        for (;;) {
   
-               if(i > traceLen) { break; }
+               if(i >= traceLen) { break; }
 
                bool isResponse;
                int timestamp = *((uint32_t *)(got+i));
@@ -173,7 +173,8 @@ int CmdLFHitagSim(const char *Cmd) {
                        return 1;
                }
                tag_mem_supplied = true;
-               if (fread(c.d.asBytes,48,1,pf) == 0) {
+               size_t bytes_read = fread(c.d.asBytes, 48, 1, pf);
+               if ( bytes_read == 0) {
                        PrintAndLog("Error: File reading error");
                        fclose(pf);
                        return 1;
Impressum, Datenschutz