input/buffered: check error in IsAvailable()

This commit is contained in:
Max Kellermann 2019-05-17 12:43:45 +02:00
parent ca5a400dbe
commit 6922a2f55e
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ BufferedInputStream::IsEOF() noexcept
bool
BufferedInputStream::IsAvailable() noexcept
{
return IsEOF() || buffer.Read(offset).HasData();
return IsEOF() || buffer.Read(offset).HasData() || read_error;
}
size_t