]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: & 0xFF instead of uint8_t
authoriceman1001 <iceman@iuse.se>
Wed, 16 Nov 2016 17:38:15 +0000 (18:38 +0100)
committericeman1001 <iceman@iuse.se>
Wed, 16 Nov 2016 17:38:15 +0000 (18:38 +0100)
client/util.c

index 3a7cbac40cc2a3ee0bdb07d9d7c6c7bdf529b4f2..0d24ac8ee32ae44dfe93cf4245274185ee580e57 100644 (file)
@@ -185,7 +185,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