mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-10 23:15:08 +01:00
Increase romName array size from 17 to 22
Crashed with Lufia II(Estpolis II) before.
This commit is contained in:
parent
132b2e7031
commit
1a8d127011
@ -4,7 +4,7 @@
|
|||||||
This project represents a community-driven effort to provide
|
This project represents a community-driven effort to provide
|
||||||
an easy to build and easy to modify cartridge dumper.
|
an easy to build and easy to modify cartridge dumper.
|
||||||
|
|
||||||
Date: 28.09.2022
|
Date: 06.10.2022
|
||||||
Version: 10.0
|
Version: 10.0
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
@ -376,7 +376,8 @@ boolean root = 0;
|
|||||||
boolean filebrowse = 0;
|
boolean filebrowse = 0;
|
||||||
|
|
||||||
// Common
|
// Common
|
||||||
char romName[17];
|
// 21 chars for SNES ROM name, one char for termination
|
||||||
|
char romName[22];
|
||||||
unsigned long sramSize = 0;
|
unsigned long sramSize = 0;
|
||||||
int romType = 0;
|
int romType = 0;
|
||||||
byte saveType;
|
byte saveType;
|
||||||
@ -401,9 +402,10 @@ unsigned long writeErrors;
|
|||||||
// Operation mode
|
// Operation mode
|
||||||
byte mode;
|
byte mode;
|
||||||
|
|
||||||
//remember folder number to create a new folder for every save
|
//remember folder number to create a new folder for every game
|
||||||
int foldern;
|
int foldern;
|
||||||
char folder[36];
|
// 4 chars for console type, 4 chars for SAVE/ROM, 21 chars for ROM name, 4 chars for folder number, 3 chars for slashes, one char for termination, one char savety
|
||||||
|
char folder[38];
|
||||||
|
|
||||||
// Array that holds the data
|
// Array that holds the data
|
||||||
byte sdBuffer[512];
|
byte sdBuffer[512];
|
||||||
|
@ -1011,7 +1011,7 @@ boolean checkcart_SNES() {
|
|||||||
// Get name
|
// Get name
|
||||||
byte myByte = 0;
|
byte myByte = 0;
|
||||||
byte myLength = 0;
|
byte myLength = 0;
|
||||||
for (unsigned int i = 0xFFC0; i < 0xFFD4; i++) {
|
for (unsigned int i = 0xFFC0; i < 0xFFD5; i++) {
|
||||||
myByte = snesHeader[i - headerStart];
|
myByte = snesHeader[i - headerStart];
|
||||||
if (isprint(myByte) && myByte != '<' && myByte != '>' && myByte != ':' && myByte != '"' && myByte != '/' && myByte != '\\' && myByte != '|' && myByte != '?' && myByte != '*') {
|
if (isprint(myByte) && myByte != '<' && myByte != '>' && myByte != ':' && myByte != '"' && myByte != '/' && myByte != '\\' && myByte != '|' && myByte != '?' && myByte != '*') {
|
||||||
romName[myLength] = char(myByte);
|
romName[myLength] = char(myByte);
|
||||||
|
Loading…
Reference in New Issue
Block a user