mirror of https://github.com/mgba-emu/mgba.git
VFS: Fix unmapping order on Win32
This commit is contained in:
parent
7c0f3842a0
commit
5d20aac7ed
|
@ -170,12 +170,12 @@ static void _vfdUnmap(struct VFile* vf, void* memory, size_t size) {
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue