V24D: More names that were one char too long

This commit is contained in:
sanni 2017-05-15 10:24:28 +02:00 committed by GitHub
parent d8b888d5a6
commit 41d238e1b6
4 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
Author: sanni Author: sanni
Date: 2017-05-15 Date: 2017-05-15
Version: V24C Version: V24D
SD lib: https://github.com/greiman/SdFat SD lib: https://github.com/greiman/SdFat
LCD lib: https://github.com/adafruit/Adafruit_SSD1306 LCD lib: https://github.com/adafruit/Adafruit_SSD1306
@ -34,7 +34,7 @@
YamaArashi - GBA flashrom bank switch command YamaArashi - GBA flashrom bank switch command
**********************************************************************************/ **********************************************************************************/
char ver[5] = "V24C"; char ver[5] = "V24D";
/****************************************** /******************************************
Define Output Define Output

View File

@ -335,7 +335,7 @@ void getCartInfo_GB() {
for (int addr = 0x0134; addr <= 0x13C; addr++) { for (int addr = 0x0134; addr <= 0x13C; addr++) {
myByte = readByte_GB(addr); myByte = readByte_GB(addr);
if (((char(myByte) >= 48 && char(myByte) <= 57) || (char(myByte) >= 65 && char(myByte) <= 122)) && myLength < 16) { if (((char(myByte) >= 48 && char(myByte) <= 57) || (char(myByte) >= 65 && char(myByte) <= 122)) && myLength < 15) {
romName[myLength] = char(myByte); romName[myLength] = char(myByte);
myLength++; myLength++;
} }

View File

@ -737,7 +737,7 @@ void getCartInfo_GBA() {
byte myLength = 0; byte myLength = 0;
for (int addr = 0xA0; addr <= 0xAB; addr++) { for (int addr = 0xA0; addr <= 0xAB; addr++) {
myByte = sdBuffer[addr]; myByte = sdBuffer[addr];
if (((char(myByte) >= 48 && char(myByte) <= 57) || (char(myByte) >= 65 && char(myByte) <= 122)) && myLength < 16) { if (((char(myByte) >= 48 && char(myByte) <= 57) || (char(myByte) >= 65 && char(myByte) <= 122)) && myLength < 15) {
romName[myLength] = char(myByte); romName[myLength] = char(myByte);
myLength++; myLength++;
} }

View File

@ -1203,7 +1203,7 @@ void idCart() {
// Get name // Get name
byte myLength = 0; byte myLength = 0;
for (unsigned int i = 0; i < 20; i++) { for (unsigned int i = 0; i < 20; i++) {
if (((char(sdBuffer[0x20 + i]) >= 48 && char(sdBuffer[0x20 + i]) <= 57) || (char(sdBuffer[0x20 + i]) >= 65 && char(sdBuffer[0x20 + i]) <= 122)) && myLength < 16) { if (((char(sdBuffer[0x20 + i]) >= 48 && char(sdBuffer[0x20 + i]) <= 57) || (char(sdBuffer[0x20 + i]) >= 65 && char(sdBuffer[0x20 + i]) <= 122)) && myLength < 15) {
romName[myLength] = char(sdBuffer[0x20 + i]); romName[myLength] = char(sdBuffer[0x20 + i]);
myLength++; myLength++;
} }