mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
fixed --max-line-length behaviour
This commit is contained in:
@@ -140,7 +140,9 @@ pub fn wc(files: ~[~str], matches: &Matches) {
|
||||
}
|
||||
|
||||
if (current_char_count > longest_line_length) {
|
||||
longest_line_length = current_char_count;
|
||||
// we subtract one here because `line.iter().len()` includes the LF
|
||||
// matches GNU 'wc' behaviour
|
||||
longest_line_length = current_char_count - 1;
|
||||
}
|
||||
},
|
||||
_ => break
|
||||
|
||||
Reference in New Issue
Block a user