From efd5bfa7b0c72656ceeecc380422a205abbb972f Mon Sep 17 00:00:00 2001 From: libertyernie Date: Tue, 29 Aug 2017 17:02:03 -0500 Subject: [PATCH] Clean file before loading --- source/fceuram.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/fceuram.cpp b/source/fceuram.cpp index 7095857..3b7371e 100644 --- a/source/fceuram.cpp +++ b/source/fceuram.cpp @@ -87,6 +87,7 @@ bool SaveRAM (char * filepath, bool silent) if (goomba_is_sram(&tag)) { + goomba_cleanup(savebuffer); // Look for just one save file. If there aren't any, or there is more than one, don't read any data. stateheader* sh1 = NULL; @@ -176,6 +177,8 @@ bool LoadRAM (char * filepath, bool silent) // Check to see if this is a PocketNES save file if (goomba_is_sram(savebuffer)) { + goomba_cleanup(savebuffer); + // Look for just one save file. If there aren't any, or there is more than one, don't read any data. stateheader* sh1 = NULL; stateheader* sh2 = NULL;