Fix for C++ std streams
This commit is contained in:
parent
98176be41d
commit
5478c2c0a7
@ -43,9 +43,14 @@ public:
|
||||
Int64 read(char* data, Int64 maxSize)
|
||||
{
|
||||
m_istr->read(data, maxSize);
|
||||
if (!m_istr->eof() && (m_istr->fail()))
|
||||
if (!m_istr->eof() && m_istr->fail()) {
|
||||
m_istr->clear();
|
||||
return -1;
|
||||
return m_istr->gcount();
|
||||
}
|
||||
const Int64 bytesCount = m_istr->gcount();
|
||||
if (m_istr->fail()) // TODO preserve eof() flag
|
||||
m_istr->clear();
|
||||
return bytesCount;
|
||||
}
|
||||
|
||||
Int64 write(const char* /*data*/, Int64 /*maxSize*/)
|
||||
|
Loading…
Reference in New Issue
Block a user