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
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ BufferingInputStream::Check()
bool
BufferingInputStream::IsAvailable(size_t offset) noexcept
{
if (offset >= size())
if (offset >= size() || error)
return true;
if (buffer.Read(offset).HasData())