Skip to content

Commit

Permalink
fix Decode implementation for List
Browse files Browse the repository at this point in the history
  • Loading branch information
gshep committed Aug 22, 2024
1 parent 9fceb6a commit 0325c5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethereum-common/src/base_types/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl<T: Decode, const N: usize> Decode for List<T, N> {
input: &mut I,
) -> Result<Self, parity_scale_codec::Error> {
let data = <Vec<T> as Decode>::decode(input)?;
if data.len() >= N {
if data.len() > N {
return Err("Decoded Vec length is greater than N".into());
}

Expand Down

0 comments on commit 0325c5d

Please sign in to comment.