Merge branch 'master' into client-test-refact

This commit is contained in:
Nikolay Volf 2016-01-26 17:34:42 +04:00
commit 6f141c1fdb

View File

@ -331,7 +331,7 @@ impl<'a> Decoder for BasicDecoder<'a> {
Some(l @ 0...0x7f) => Ok(try!(f(&[l]))), Some(l @ 0...0x7f) => Ok(try!(f(&[l]))),
// 0-55 bytes // 0-55 bytes
Some(l @ 0x80...0xb7) => { Some(l @ 0x80...0xb7) => {
let last_index_of = 1 + l as usize - 0x80; let last_index_of = 1 + l as usize - 0x80;
if bytes.len() < last_index_of { if bytes.len() < last_index_of {
return Err(DecoderError::RlpInconsistentLengthAndData); return Err(DecoderError::RlpInconsistentLengthAndData);
} }