mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-27 20:47:58 +00:00
Fix size_requirement underflow
This commit is contained in:
@@ -159,7 +159,11 @@ impl Calldata {
|
||||
|
||||
pub fn size_requirement(&self) -> usize {
|
||||
match self {
|
||||
Calldata::Single(single) => (single.len() - 2) / 2,
|
||||
Calldata::Single(single) => single
|
||||
.len()
|
||||
.checked_sub(2)
|
||||
.and_then(|value| value.checked_div(2))
|
||||
.unwrap_or_default(),
|
||||
Calldata::Compound(items) => items.len() * 32,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user