Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Handle invalid working directories gracefully when using `--full-path`, see #1900 (@Xavrir).
- Fire the "search pattern contains a path separator" diagnostic for any pattern containing `/`, not just patterns that happen to name an existing directory. Preserves the legacy Windows behaviour that also flags native `\` separators when the pattern resolves to a real directory. See #1873.
- Fix bug where passing "-" as a directory argument didn't actually search that directory, see #849 (@Sean-Kenneth-Doherty).
- Don't panic if the argument to `--size` overflows.

# 10.4.2

Expand Down
4 changes: 3 additions & 1 deletion src/filter/size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl SizeFilter {
_ => return None,
};

let size = quantity * multiplier;
let size = quantity.checked_mul(multiplier)?;
match limit_kind {
"+" => Some(SizeFilter::Min(size)),
"-" => Some(SizeFilter::Max(size)),
Expand Down Expand Up @@ -191,6 +191,8 @@ mod tests {
ensure_invalid_unit_returns_none_3: "+1Mv",
ensure_bib_format_returns_none: "+1bib",
ensure_bb_format_returns_none: "+1bb",
ensure_overflow_returns_none_1: "+18446745t",
ensure_overflow_returns_none_2: "+16777217Ti",
}

#[test]
Expand Down