From 5cdb432d603c85926556423cc7a93bdcd225f123 Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Sun, 21 Dec 2014 19:44:04 +0100 Subject: [PATCH] Fixed seeking after reaching EOF --- src/SFML/System/FileInputStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFML/System/FileInputStream.cpp b/src/SFML/System/FileInputStream.cpp index 731129b9..c9c1a49c 100644 --- a/src/SFML/System/FileInputStream.cpp +++ b/src/SFML/System/FileInputStream.cpp @@ -49,7 +49,7 @@ Int64 FileInputStream::read(void* data, Int64 size) //////////////////////////////////////////////////////////// Int64 FileInputStream::seek(Int64 position) { - if (m_file.eof()) + if (m_file.eof() || m_file.fail()) m_file.clear(); m_file.seekg(position); return tell();