mirror of
https://github.com/sanni/cartreader.git
synced 2025-01-12 21:19:06 +01:00
V28D: Simplify GBA Logo Check
byte overflow in last commit
This commit is contained in:
parent
2a0ca1b236
commit
684cb15fc9
@ -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(""));
|
||||
|
Loading…
x
Reference in New Issue
Block a user