Skip to content

Commit 886f589

Browse files
committed
Fix description on second load.
Add note that only LF EOL is supported.
1 parent 9f51f69 commit 886f589

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/menu/rom_info.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -805,14 +805,14 @@ static void load_rom_info_from_file (path_t *path, rom_info_t *rom_info) {
805805

806806
mini_t *rom_info_ini = mini_load(path_get(rom_info_path));
807807

808-
const char *rom_description = "None.\n\0";
808+
const char *rom_description = "None.\n";
809809

810810
rom_info->boot_override.cic = false;
811811
rom_info->boot_override.save = false;
812812
rom_info->boot_override.tv = false;
813813

814814
if (rom_info_ini) {
815-
rom_description = mini_get_string(rom_info_ini, "metadata", "description", "None.\n\0");
815+
rom_description = mini_get_string(rom_info_ini, "metadata", "description", "None.\n"); //FIXME: only supports LF (UNIX) line endings. CRLF will not work.
816816

817817
rom_info->boot_override.cic_type = mini_get_int(rom_info_ini, "custom_boot", "cic_type", ROM_CIC_TYPE_AUTOMATIC);
818818
if (rom_info->boot_override.cic_type != ROM_CIC_TYPE_AUTOMATIC) {
@@ -835,8 +835,7 @@ static void load_rom_info_from_file (path_t *path, rom_info_t *rom_info) {
835835
mini_free(rom_info_ini);
836836
}
837837

838-
strncpy(rom_info->metadata.description, rom_description, sizeof(rom_info->metadata.description) - 1);
839-
rom_info->metadata.description[sizeof(rom_info->metadata.description) - 1] = '\0';
838+
strncpy(rom_info->metadata.description, rom_description, sizeof(rom_info->metadata.description));
840839

841840
path_free(rom_info_path);
842841
}

src/menu/views/load_disk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@ static void draw (menu_t *menu, surface_t *d) {
8181
ui_components_actions_bar_text_draw(
8282
ALIGN_LEFT, VALIGN_TOP,
8383
"A: Load and run 64DD disk\n"
84-
"B: Exit"
84+
"B: Exit\n"
8585
);
8686

8787
if (menu->load.rom_path) {
8888
ui_components_actions_bar_text_draw(
8989
ALIGN_RIGHT, VALIGN_TOP,
9090
"L|Z: Load with ROM\n"
91+
"\n"
9192
);
9293
}
9394

0 commit comments

Comments
 (0)