mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-14 08:55:06 +01:00
Cart_Reader.ino: Assorted cosmetic changes to compareCRC.
Shorten gamename to the number of bytes actually used in the code, more sizeof() use.
This commit is contained in:
parent
264d83f383
commit
50da6b9da7
@ -636,7 +636,7 @@ boolean compareCRC(char* database, char* crcString, boolean renamerom, int offse
|
|||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
//Search for CRC32 in file
|
//Search for CRC32 in file
|
||||||
char gamename[100];
|
char gamename[96];
|
||||||
char crc_search[9];
|
char crc_search[9];
|
||||||
|
|
||||||
//go to root
|
//go to root
|
||||||
@ -645,8 +645,8 @@ boolean compareCRC(char* database, char* crcString, boolean renamerom, int offse
|
|||||||
//Search for same CRC in list
|
//Search for same CRC in list
|
||||||
while (myFile.available()) {
|
while (myFile.available()) {
|
||||||
//Read 2 lines (game name and CRC)
|
//Read 2 lines (game name and CRC)
|
||||||
get_line(gamename, &myFile, 96);
|
get_line(gamename, &myFile, sizeof(gamename));
|
||||||
get_line(crc_search, &myFile, 9);
|
get_line(crc_search, &myFile, sizeof(crc_search));
|
||||||
skip_line(&myFile); //Skip every 3rd line
|
skip_line(&myFile); //Skip every 3rd line
|
||||||
|
|
||||||
//if checksum search successful, rename the file and end search
|
//if checksum search successful, rename the file and end search
|
||||||
|
Loading…
Reference in New Issue
Block a user