Skip to content

Commit 3ed2b46

Browse files
committed
fix compiletest crash
1 parent 7905eff commit 3ed2b46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/compiletest/src/read2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl ProcOutput {
8383
}
8484

8585
let new_len = bytes.len();
86-
if *filtered_len <= HEAD_LEN + TAIL_LEN {
86+
if (*filtered_len).min(new_len) <= HEAD_LEN + TAIL_LEN {
8787
return;
8888
}
8989

0 commit comments

Comments
 (0)