From 7d159efe40eb000840e5dbc2274ff8d39f81cbc8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 16 Nov 2016 18:38:15 +0100 Subject: [PATCH] FIX: & 0xFF instead of uint8_t --- client/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.39.2