From 67f2850d370b26f321b91467d8d9762fac123069 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sat, 22 Sep 2018 15:52:10 +1000 Subject: [PATCH] Fix bug on BooleanBitfield decoding --- boolean-bitfield/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boolean-bitfield/src/lib.rs b/boolean-bitfield/src/lib.rs index 9a6effebb..717f48776 100644 --- a/boolean-bitfield/src/lib.rs +++ b/boolean-bitfield/src/lib.rs @@ -161,7 +161,8 @@ impl ssz::Decodable for BooleanBitfield { Ok((BooleanBitfield::new(), index + ssz::LENGTH_BYTES)) } else { - let b = BooleanBitfield::from(&bytes[(index + 4)..(len + 4)]); + let b = BooleanBitfield:: + from(&bytes[(index + 4)..(index + len + 4)]); let index = index + ssz::LENGTH_BYTES + len; Ok((b, index)) }