diff options
Diffstat (limited to 'src/bitfield')
-rw-r--r-- | src/bitfield/bitfield.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bitfield/bitfield.c b/src/bitfield/bitfield.c index dddb0ee2..e40ab1ab 100644 --- a/src/bitfield/bitfield.c +++ b/src/bitfield/bitfield.c @@ -38,6 +38,7 @@ uint64_t get_bitfield(const uint8_t source[], const uint8_t source_length, uint64_t whole; uint8_t bytes[sizeof(uint64_t)]; } combined; + memset(combined.bytes, 0, sizeof(combined.bytes)); copy_bits_right_aligned(source, source_length, offset, bit_count, combined.bytes, sizeof(combined.bytes)); if(BYTE_ORDER == LITTLE_ENDIAN) { |