From 8c813758f34b8514d2b8d43846a0da402f2e5ed4 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Thu, 8 Jun 2023 13:07:03 +0000 Subject: [PATCH] Fix rom title --- src/menu/menu_main.c | 1 + src/menu/rom_database.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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;