Commit 219546cb authored by Max Kellermann's avatar Max Kellermann

input/buffering: check error in IsAvailable()

parent 555a4d73
...@@ -58,7 +58,7 @@ BufferingInputStream::Check() ...@@ -58,7 +58,7 @@ BufferingInputStream::Check()
bool bool
BufferingInputStream::IsAvailable(size_t offset) noexcept BufferingInputStream::IsAvailable(size_t offset) noexcept
{ {
if (offset >= size()) if (offset >= size() || error)
return true; return true;
if (buffer.Read(offset).HasData()) if (buffer.Read(offset).HasData())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment