mirror of
https://github.com/sanni/cartreader.git
synced 2025-01-27 12:15:27 +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
|
// Compare Nintendo logo against known checksum, 156 bytes starting at 0x04
|
||||||
byte logoChecksum = 0;
|
word logoChecksum = 0;
|
||||||
for (int currByte = 0x4; currByte < 0xA0; currByte++) {
|
for (int currByte = 0x4; currByte < 0xA0; currByte++) {
|
||||||
logoChecksum += sdBuffer[currByte];
|
logoChecksum += sdBuffer[currByte];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logoChecksum != 0x1B) {
|
if (logoChecksum != 0x4B1B) {
|
||||||
print_Error(F("CARTRIDGE ERROR"), false);
|
print_Error(F("CARTRIDGE ERROR"), false);
|
||||||
strcpy(romName, "ERROR");
|
strcpy(romName, "ERROR");
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user