]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/util.c
fixed crash, when proxmark was claimed by other process
[proxmark3-svn] / client / util.c
index 8a62e361aec8f9ba8452c12887627d13eabe70b5..fa24906d1d32047cefe19ed3a9eb606919daa0ba 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "util.h"
 
-#ifndef WIN32
+#ifndef _WIN32
 #include <termios.h>
 #include <sys/ioctl.h> 
 int ukbhit(void)
@@ -80,15 +80,13 @@ void AddLogCurrentDT(char *fileName) {
        AddLogLine(fileName, "\nanticollision: ", buff);
 }
 
-void FillFileNameByUID(char *fileName, uint8_t * uid, char *ext) {
+void FillFileNameByUID(char *fileName, uint8_t * uid, char *ext, int byteCount) {
        char * fnameptr = fileName;
        memset(fileName, 0x00, 200);
        
-       for (int j = 0; j < 7; j++, fnameptr += 2)
+       for (int j = 0; j < byteCount; j++, fnameptr += 2)
                sprintf(fnameptr, "%02x", uid[j]); 
        sprintf(fnameptr, "%s", ext); 
-       
-       printf("fname:%s", fileName);
 }
 
 // printing and converting functions
Impressum, Datenschutz