From 684cb15fc9ae5665227beab697a566d5d1cef4e4 Mon Sep 17 00:00:00 2001 From: sanni Date: Fri, 15 Sep 2017 18:13:46 +0200 Subject: [PATCH] V28D: Simplify GBA Logo Check byte overflow in last commit --- Cart_Reader/GBA.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cart_Reader/GBA.ino b/Cart_Reader/GBA.ino index 145e300..5defd06 100644 --- a/Cart_Reader/GBA.ino +++ b/Cart_Reader/GBA.ino @@ -748,12 +748,12 @@ void getCartInfo_GBA() { } // Compare Nintendo logo against known checksum, 156 bytes starting at 0x04 - byte logoChecksum = 0; + word logoChecksum = 0; for (int currByte = 0x4; currByte < 0xA0; currByte++) { logoChecksum += sdBuffer[currByte]; } - if (logoChecksum != 0x1B) { + if (logoChecksum != 0x4B1B) { print_Error(F("CARTRIDGE ERROR"), false); strcpy(romName, "ERROR"); println_Msg(F(""));