Skip to content

Commit

Permalink
fixup! split: fix bug with large arguments to -C
Browse files Browse the repository at this point in the history
  • Loading branch information
jfinkels committed Jan 12, 2025
1 parent 07e42d7 commit c6ac492
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/split/src/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ where
// If the entire line fits in this chunk, write it and
// continue to the next line.
if line.len() <= remaining {
custom_write_all(line, &mut writer, &settings)?;
custom_write_all(line, &mut writer, settings)?;
remaining -= line.len();
break;
}
Expand All @@ -1524,7 +1524,7 @@ where
// at the start of a new chunk, write as much as we can of
// it and pass the remainder along to the next chunk.
if line.len() > chunk_size && remaining == chunk_size {
custom_write_all(&line[..chunk_size], &mut writer, &settings)?;
custom_write_all(&line[..chunk_size], &mut writer, settings)?;
line = &line[chunk_size..];
remaining = 0;
continue;
Expand Down

0 comments on commit c6ac492

Please sign in to comment.