mirror of
https://github.com/dborth/fceugx.git
synced 2024-10-31 22:45:05 +01:00
fix mem card write verify bug
This commit is contained in:
parent
9bf435e06d
commit
2a57f620ab
@ -29,6 +29,7 @@
|
||||
|
||||
static u8 * SysArea = NULL;
|
||||
static char savecomments[2][32];
|
||||
static u8 * verifybuffer = NULL;
|
||||
|
||||
/****************************************************************************
|
||||
* MountMC
|
||||
@ -154,14 +155,14 @@ static int
|
||||
VerifyMCFile (char *buf, int slot, char *filename, int datasize)
|
||||
{
|
||||
card_file CardFile;
|
||||
unsigned char verifybuffer[65536] ATTRIBUTE_ALIGN (32);
|
||||
int CardError;
|
||||
unsigned int blocks;
|
||||
unsigned int SectorSize;
|
||||
int bytesleft = 0;
|
||||
int bytesread = 0;
|
||||
|
||||
memset (verifybuffer, 0, 65536);
|
||||
verifybuffer = (u8 *)memalign(32, 262144);
|
||||
memset (verifybuffer, 0, 262144);
|
||||
|
||||
// Get Sector Size
|
||||
CARD_GetSectorSize (slot, &SectorSize);
|
||||
@ -205,6 +206,7 @@ VerifyMCFile (char *buf, int slot, char *filename, int datasize)
|
||||
CARD_Close (&CardFile);
|
||||
CancelAction();
|
||||
}
|
||||
free(verifybuffer);
|
||||
return bytesread;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user