diff --git a/Cart_Reader/COLV.ino b/Cart_Reader/COLV.ino index 77ab2cd..c17e60f 100644 --- a/Cart_Reader/COLV.ino +++ b/Cart_Reader/COLV.ino @@ -386,7 +386,11 @@ void setCart_COL() { display_Clear(); // Read game name +#if defined(enable_OLED) get_line(gamename, &myFile, 42); +#else + get_line(gamename, &myFile, 96); +#endif // Read CRC32 checksum sprintf(checksumStr, "%c", myFile.read()); diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 9a14166..f0ee09b 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -1966,14 +1966,14 @@ void println_Msg(const char myString[]) { if ((display.tx + strlen(myString) * 6) > 128) { int strPos = 0; // Print until end of display - while (display.tx < 122) { + while ((display.tx < 122) && (myString[strPos] != '\0')) { display.print(myString[strPos]); strPos++; } // Newline display.setCursor(0, display.ty + 8); // Print until end of display and ignore remaining characters - while ((strPos < strlen(myString)) && (display.tx < 122)) { + while ((strPos < strlen(myString)) && (display.tx < 122) && (myString[strPos] != '\0')) { display.print(myString[strPos]); strPos++; } diff --git a/Cart_Reader/INTV.ino b/Cart_Reader/INTV.ino index df3b4dd..81f5876 100644 --- a/Cart_Reader/INTV.ino +++ b/Cart_Reader/INTV.ino @@ -772,7 +772,11 @@ void setCart_INTV() { display_Clear(); // Read game name +#if defined(enable_OLED) get_line(gamename, &myFile, 42); +#else + get_line(gamename, &myFile, 96); +#endif // Read CRC32 checksum sprintf(checksumStr, "%c", myFile.read());