all repos — mgba @ 5d20aac7ed1f9d60012d9128e754bfcbee9939ba

mGBA Game Boy Advance Emulator

VFS: Fix unmapping order on Win32
Vicki Pfau vi@endrift.com
Sat, 08 Feb 2020 13:34:38 -0800
commit

5d20aac7ed1f9d60012d9128e754bfcbee9939ba

parent

7c0f3842a064ec6bd6722d93da9dec399f48ee54

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/util/vfs/vfs-fd.csrc/util/vfs/vfs-fd.c

@@ -170,12 +170,12 @@ struct VFileFD* vfd = (struct VFileFD*) vf;

size_t i; for (i = 0; i < HandleMappingListSize(&vfd->handles); ++i) { if (HandleMappingListGetPointer(&vfd->handles, i)->mapping == memory) { + UnmapViewOfFile(memory); CloseHandle(HandleMappingListGetPointer(&vfd->handles, i)->handle); HandleMappingListShift(&vfd->handles, i, 1); break; } } - UnmapViewOfFile(memory); } #endif