From 9357fd79e3c9037804a85474e4a2bbaabe6af75f Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 28 Apr 2017 20:53:40 -0500 Subject: [PATCH] fix bug in fsnitro FAT reading; fixes #63 --- desmume/src/utils/fsnitro.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desmume/src/utils/fsnitro.cpp b/desmume/src/utils/fsnitro.cpp index 0ece1514e..391e03822 100644 --- a/desmume/src/utils/fsnitro.cpp +++ b/desmume/src/utils/fsnitro.cpp @@ -146,10 +146,9 @@ bool FS_NITRO::loadFileTables() fnt = new FNT_NITRO[numDirs]; // ========= FAT (File Allocation Table) + gameInfo.reader->Seek(gameInfo.fROM, FATOff, SEEK_SET); for (u32 i = 0; i < numFiles; i++) { - const u32 ofs = (i * 2); - gameInfo.reader->Seek(gameInfo.fROM, FATOff + ofs, SEEK_SET); gameInfo.reader->Read(gameInfo.fROM, &fat[i].start, 4); gameInfo.reader->Read(gameInfo.fROM, &fat[i].end, 4); fat[i].size = fat[i].end - fat[i].start;