summaryrefslogtreecommitdiffstats
path: root/src/bitfield/bitfield.c
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-04 11:51:14 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-04 11:51:14 -0500
commitf0d31caa3955365f6a393d788831f4b53fade000 (patch)
tree10fff41de2ee6d9443a499aae7090bfb03ffe888 /src/bitfield/bitfield.c
parent28e30830755758d13458c05ebe2a8db5dc9f43a0 (diff)
Fix parse_bool tests.
Diffstat (limited to 'src/bitfield/bitfield.c')
-rw-r--r--src/bitfield/bitfield.c1
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) {