summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
Diffstat (limited to 'AK')
-rw-r--r--AK/BufferedStream.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/AK/BufferedStream.h b/AK/BufferedStream.h
index c0e9512958..927c3db4d9 100644
--- a/AK/BufferedStream.h
+++ b/AK/BufferedStream.h
@@ -193,7 +193,10 @@ public:
if (stream().is_eof())
return m_buffer.used_space() > 0;
- return TRY(find_and_populate_until_any_of(Array<StringView, 1> { "\n"sv })).has_value();
+ auto maybe_match = TRY(find_and_populate_until_any_of(Array { "\n"sv }));
+ if (maybe_match.has_value())
+ return true;
+ return stream().is_eof() && m_buffer.used_space() > 0;
}
bool is_eof() const