input/buffering: check error in IsAvailable()

This commit is contained in:
Max Kellermann 2019-05-17 12:42:46 +02:00
parent 555a4d738c
commit 219546cb81

View File

@ -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())