]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/util.c
Fix some missing include statements which impact using proxmark3 client as a library.
[proxmark3-svn] / client / util.c
index 3a7cbac40cc2a3ee0bdb07d9d7c6c7bdf529b4f2..f70b5aed8600a9c0d510d529ae7dd28a56fc28e0 100644 (file)
@@ -12,6 +12,8 @@
 #define MAX_BIN_BREAK_LENGTH   (3072+384+1)
 
 #ifndef _WIN32
+#include <sys/ttydefaults.h>
+
 int ukbhit(void) {
   int cnt = 0;
   int error;
@@ -185,7 +187,7 @@ char *sprint_hex_ascii(const uint8_t *data, const size_t len) {
 
 void num_to_bytes(uint64_t n, size_t len, uint8_t* dest) {
        while (len--) {
-               dest[len] = (uint8_t) n;
+               dest[len] = n & 0xFF;
                n >>= 8;
        }
 }
Impressum, Datenschutz