Fixed seeking after reaching EOF

This commit is contained in:
Marco Antognini 2014-12-21 19:44:04 +01:00 committed by Mario Liebisch
parent 1d24b52220
commit 5cdb432d60

View File

@ -49,7 +49,7 @@ Int64 FileInputStream::read(void* data, Int64 size)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Int64 FileInputStream::seek(Int64 position) Int64 FileInputStream::seek(Int64 position)
{ {
if (m_file.eof()) if (m_file.eof() || m_file.fail())
m_file.clear(); m_file.clear();
m_file.seekg(position); m_file.seekg(position);
return tell(); return tell();