fix compiletest crash

This commit is contained in:
Jan-Mirko Otter 2023-07-01 23:58:47 +02:00
parent 7905eff5f7
commit 3ed2b46f28

View File

@ -83,7 +83,7 @@ fn extend(&mut self, data: &[u8], filter_paths_from_len: &[String]) {
}
let new_len = bytes.len();
if *filtered_len <= HEAD_LEN + TAIL_LEN {
if (*filtered_len).min(new_len) <= HEAD_LEN + TAIL_LEN {
return;
}