Skip to content

Commit

Permalink
Fix ROM header length (vaguerant, emukidid)
Browse files Browse the repository at this point in the history
Reference: emukidid@192b7c0
  • Loading branch information
saulfabregwiivc committed Nov 2, 2023
1 parent f470fb0 commit 6e86400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/rom_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ int rom_read(fileBrowser_file* file){
ROM_HEADER.Country_code = bswap16(ROM_HEADER.Country_code);
//Copy header name as Goodname (in the .ini we can use CRC to identify ROMS)
memset((char*)buffer,0,1024);
strncpy(buffer, (char*)ROM_HEADER.Name,32);
//Maximum ROM name is 32 bytes. Lets make sure we cut off trailing spaces
strncpy(buffer, (char*)ROM_HEADER.Name,20);
//Maximum ROM name is 20 bytes. Lets make sure we cut off trailing spaces
for(i = strlen(buffer); i>0; i--)
{
if(buffer[i-1] != ' ') {
Expand Down

0 comments on commit 6e86400

Please sign in to comment.