]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfhitag.c
BUG: the lf read now uses "getbigbuffer" which the offset from where the data start...
[proxmark3-svn] / client / cmdlfhitag.c
index ab279dcb32e30b94b75ea88f5708db46b1d317bf..038ec887c9683b17d77f2db7205e8bc7fab7e668 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include "data.h"
-//#include "proxusb.h"
 #include "proxmark3.h"
 #include "ui.h"
 #include "cmdparser.h"
-#include "common.h"
+#include "../include/common.h"
 #include "util.h"
-#include "hitag2.h"
+#include "../include/hitag2.h"
 #include "sleep.h"
 #include "cmdmain.h"
 
@@ -147,7 +146,10 @@ int CmdLFHitagSim(const char *Cmd) {
                        return 1;
                }
                tag_mem_supplied = true;
-               fread(c.d.asBytes,48,1,pf);
+               if (fread(c.d.asBytes,48,1,pf) == 0) {
+      PrintAndLog("Error: File reading error");
+                       return 1;
+    }
                fclose(pf);
        } else {
                tag_mem_supplied = false;
Impressum, Datenschutz