mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
ptx: fix panic caused by improper assert (#10916)
* ptx: fix panic caused by improper assert * fix formatting
This commit is contained in:
@@ -501,7 +501,7 @@ fn get_output_chunks(
|
||||
// and get the string.
|
||||
let before_str: String = all_before[before_beg..before_end].iter().collect();
|
||||
before.push_str(&before_str);
|
||||
assert!(max_before_size >= before.len());
|
||||
assert!(max_before_size >= before.chars().count());
|
||||
|
||||
// the after chunk
|
||||
|
||||
|
||||
Reference in New Issue
Block a user