Loader: Don’t assume the file hasn’t been read before.
This commit is contained in:
parent
b5237e885d
commit
04622a859c
3 changed files with 13 additions and 4 deletions
|
@ -100,6 +100,9 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr)
|
|||
if (!file.IsOpen())
|
||||
return ERROR_FILE;
|
||||
|
||||
// Reset read pointer in case this file has been read before.
|
||||
file.Seek(0, SEEK_SET);
|
||||
|
||||
THREEDSX_Header hdr;
|
||||
if (file.ReadBytes(&hdr, sizeof(hdr)) != sizeof(hdr))
|
||||
return ERROR_READ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue