From 293fdbe333d005ae0f1927da4ebe796aa30c6b18 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 16 Jan 2017 20:59:14 +0000 Subject: [PATCH] fix bug in rom.writebyte --- trunk/src/fceu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/fceu.cpp b/trunk/src/fceu.cpp index 47668a9e..462fca2f 100644 --- a/trunk/src/fceu.cpp +++ b/trunk/src/fceu.cpp @@ -1313,6 +1313,6 @@ void FCEU_WriteRomByte(uint32 i, uint8 value) { #endif if (i < 16 + PRGsize[0]) PRGptr[0][i - 16] = value; - if (i < 16 + PRGsize[0] + CHRsize[0]) + else if (i < 16 + PRGsize[0] + CHRsize[0]) CHRptr[0][i - 16 - PRGsize[0]] = value; }