mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed seeking after reaching EOF
This commit is contained in:
parent
1d24b52220
commit
5cdb432d60
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user