From 77f5ea6453ebb1693f91d2859e8e89ee6422644c Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Thu, 23 Aug 2012 17:41:52 +0200 Subject: [PATCH] Add seek to the beginning of the file before to read the header On windows, ifstream::open does not garantee to be at the beginning of the file. --- src/psd.imageio/psdinput.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/psd.imageio/psdinput.cpp b/src/psd.imageio/psdinput.cpp index 3fca5c857e..8aa1e660c0 100644 --- a/src/psd.imageio/psdinput.cpp +++ b/src/psd.imageio/psdinput.cpp @@ -628,6 +628,7 @@ PSDInput::load_header () bool PSDInput::read_header () { + m_file.seekg(0, std::ios::beg); m_file.read (m_header.signature, 4); read_bige (m_header.version); m_file.seekg(6, std::ios::cur);