mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
GCMemcard: Fix incorrect directory block being accessed in RemoveFile().
When deleting files, block index data was always fetched from the first copy of the directory listing rather than the currently active one.
This commit is contained in:
parent
3e03b13392
commit
431e6c42e1
@ -739,8 +739,8 @@ u32 GCMemcard::RemoveFile(u8 index) // index in the directory array
|
|||||||
if (index >= DIRLEN)
|
if (index >= DIRLEN)
|
||||||
return DELETE_FAIL;
|
return DELETE_FAIL;
|
||||||
|
|
||||||
u16 startingblock = BE16(dir.Dir[index].FirstBlock);
|
u16 startingblock = BE16(CurrentDir->Dir[index].FirstBlock);
|
||||||
u16 numberofblocks = BE16(dir.Dir[index].BlockCount);
|
u16 numberofblocks = BE16(CurrentDir->Dir[index].BlockCount);
|
||||||
|
|
||||||
BlockAlloc UpdatedBat = *CurrentBat;
|
BlockAlloc UpdatedBat = *CurrentBat;
|
||||||
if (!UpdatedBat.ClearBlocks(startingblock, numberofblocks))
|
if (!UpdatedBat.ClearBlocks(startingblock, numberofblocks))
|
||||||
|
Loading…
Reference in New Issue
Block a user