diff --git a/source/gx/fileio/file_mem.c b/source/gx/fileio/file_mem.c index 812ca82..1996638 100644 --- a/source/gx/fileio/file_mem.c +++ b/source/gx/fileio/file_mem.c @@ -131,7 +131,7 @@ static int FAT_ManageFile(char *filename, u8 direction, u8 filetype) if (filetype) /* SRAM */ { - memcpy(sram.sram, savebuffer, filesize); + memcpy(sram.sram, savebuffer, done); sram.crc = crc32 (0, sram.sram, 0x10000); } else