diff --git a/src/menu/menu_main.c b/src/menu/menu_main.c index bd5105cd..edcff272 100644 --- a/src/menu/menu_main.c +++ b/src/menu/menu_main.c @@ -35,6 +35,7 @@ rom_header_t file_read_rom_header(char *path) { fread(&(rom_header->checksum), sizeof(uint64_t), 1, fp); fseek(fp, 0x20, SEEK_SET); fread(&(rom_header->title), sizeof(rom_header->title), 1, fp); + rom_header->title[20] = '\0'; fseek(fp, 0x3b, SEEK_SET); fread(&(rom_header->metadata.media_type), sizeof(rom_header->metadata.media_type), 1, fp); //fseek(fp, 0x3c, SEEK_SET); // Consecutive read (no need to seek). diff --git a/src/menu/rom_database.h b/src/menu/rom_database.h index c4956810..5c52e19b 100644 --- a/src/menu/rom_database.h +++ b/src/menu/rom_database.h @@ -68,7 +68,7 @@ typedef struct { typedef struct { uint64_t checksum; - uint8_t title[14]; + uint8_t title[21]; rom_metadata_t metadata; uint8_t version; } rom_header_t;