1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

fixed --max-line-length behaviour

This commit is contained in:
Boden Garman 2013-11-30 12:57:15 +11:00
parent 5000ad7f39
commit 68e98ae5e0

View file

@ -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