mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fix bug in raw_fd_istream::read_impl(). (#30)
It would not set error if read() returned 0 (indicating EOF).
This commit is contained in:
@@ -117,7 +117,7 @@ void raw_fd_istream::read_impl(void* data, std::size_t len) {
|
||||
#else
|
||||
ssize_t count = ::read(m_fd, m_buf, m_bufSize);
|
||||
#endif
|
||||
if (count < 0) {
|
||||
if (count <= 0) {
|
||||
error_detected();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user