From 8ef2e53f864edbb9e316ca30af6e41748d59aec3 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 27 Oct 2012 20:50:28 +0000 Subject: [PATCH] fix a nondeterminism bug created by MasterRomInfoParams and roms being loaded in various orders without clearing out the params --- src/fceu.cpp | 3 +++ src/ines.cpp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fceu.cpp b/src/fceu.cpp index ee78fbae..311746e0 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -426,6 +426,9 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode) ResetGameLoaded(); + //reset parameters so theyre cleared just in case a format's loader doesnt know to do the clearing + MasterRomInfoParams = TMasterRomInfoParams(); + if (!AutosaveStatus) AutosaveStatus = (int*)FCEU_dmalloc(sizeof(int)*AutosaveQty); for (AutosaveIndex=0; AutosaveIndex