mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
Userland: Make grep exit after hitting EOF on stdin
This commit is contained in:
parent
3eeb00b003
commit
12f214e2f0
Notes:
sideshowbarker
2024-07-19 00:38:24 +09:00
Author: https://github.com/ccapitalK Commit: https://github.com/SerenityOS/serenity/commit/12f214e2f06 Pull-request: https://github.com/SerenityOS/serenity/pull/4519
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ int main(int argc, char** argv)
|
|||
|
||||
if (!files.size() && !recursive) {
|
||||
auto stdin_file = Core::File::standard_input();
|
||||
for (;;) {
|
||||
while (!stdin_file->eof()) {
|
||||
auto line = stdin_file->read_line();
|
||||
bool is_binary = line.bytes().contains_slow(0);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue