GBA Savedata: Fix extracting save when not yet configured in-game

This commit is contained in:
Vicki Pfau 2020-06-18 01:26:54 -07:00
parent 853cdf2880
commit 83237c7e76
2 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Emulation fixes:
- GB MBC: Fix MBC2 bit selection
Other fixes:
- GB Core: Fix extracting SRAM when none is present
- GBA Savedata: Fix extracting save when not yet configured in-game
0.8.2: (2020-06-14)
Emulation fixes:

View File

@ -139,6 +139,7 @@ bool GBASavedataClone(struct GBASavedata* savedata, struct VFile* out) {
} else if (savedata->vf) {
off_t read = 0;
uint8_t buffer[2048];
savedata->vf->seek(savedata->vf, 0, SEEK_SET);
do {
read = savedata->vf->read(savedata->vf, buffer, sizeof(buffer));
out->write(out, buffer, read);