diff options
| author | 2015-01-06 22:47:43 +0000 | |
|---|---|---|
| committer | 2015-01-15 22:23:07 +0100 | |
| commit | 04622a859cc748745cbbeb0b332f930085438077 (patch) | |
| tree | 3aaf5244552971eb47bbbc8319f06fe4834f1460 /src/core/loader/3dsx.cpp | |
| parent | Loader: Keep a reference to the file and pass it to the correct AppLoader, in... (diff) | |
| download | yuzu-04622a859cc748745cbbeb0b332f930085438077.tar.gz yuzu-04622a859cc748745cbbeb0b332f930085438077.tar.xz yuzu-04622a859cc748745cbbeb0b332f930085438077.zip | |
Loader: Don’t assume the file hasn’t been read before.
Diffstat (limited to 'src/core/loader/3dsx.cpp')
| -rw-r--r-- | src/core/loader/3dsx.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 873ee8b25..e239808f3 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp | |||
| @@ -100,6 +100,9 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr) | |||
| 100 | if (!file.IsOpen()) | 100 | if (!file.IsOpen()) |
| 101 | return ERROR_FILE; | 101 | return ERROR_FILE; |
| 102 | 102 | ||
| 103 | // Reset read pointer in case this file has been read before. | ||
| 104 | file.Seek(0, SEEK_SET); | ||
| 105 | |||
| 103 | THREEDSX_Header hdr; | 106 | THREEDSX_Header hdr; |
| 104 | if (file.ReadBytes(&hdr, sizeof(hdr)) != sizeof(hdr)) | 107 | if (file.ReadBytes(&hdr, sizeof(hdr)) != sizeof(hdr)) |
| 105 | return ERROR_READ; | 108 | return ERROR_READ; |