Fix bug on BooleanBitfield decoding

This commit is contained in:
Paul Hauner 2018-09-22 15:52:10 +10:00
parent 1bbf4a86cb
commit 67f2850d37
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -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))
}