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

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