X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1ca5dce0f4d297d739010ca5fc5954683fa3ec1a..8cdf15c2b3b83ef3f6bbb11f5921b69efce69fe9:/client/util.c diff --git a/client/util.c b/client/util.c index 3a7cbac4..0d24ac8e 100644 --- a/client/util.c +++ b/client/util.c @@ -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; } }