mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Userland: Fix broken newlines in 'sort'
This commit is contained in:
parent
ab07a713bf
commit
9c8efcd17e
Notes:
sideshowbarker
2024-07-18 23:02:29 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/9c8efcd17e8 Pull-request: https://github.com/SerenityOS/serenity/pull/5010
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
|
|||
}
|
||||
if (buflen == -1)
|
||||
break;
|
||||
lines.append(buffer);
|
||||
lines.append({ buffer, AK::ShouldChomp::Chomp });
|
||||
}
|
||||
|
||||
quick_sort(lines, [](auto& a, auto& b) {
|
||||
|
@ -62,6 +62,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
|
|||
|
||||
for (auto& line : lines) {
|
||||
fputs(line.characters(), stdout);
|
||||
fputc('\n', stdout);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue