Do not implicitly concatenate localized strings (#15383)

This commit is contained in:
Marcio Teixeira
2019-09-27 03:38:43 -06:00
committed by Scott Lahteine
parent 62e4e05a19
commit a18d16fb8b
7 changed files with 62 additions and 37 deletions

View File

@@ -82,10 +82,14 @@ inline void sdcard_start_selected_file() {
#if ENABLED(SD_MENU_CONFIRM_START)
void menu_sd_confirm() {
char * const longest = card.longest_filename();
char buffer[strlen(longest) + 2];
buffer[0] = ' ';
strcpy(buffer + 1, longest);
do_select_screen(
PSTR(MSG_BUTTON_PRINT), PSTR(MSG_BUTTON_CANCEL),
sdcard_start_selected_file, ui.goto_previous_screen,
PSTR(MSG_START_PRINT " "), card.longest_filename(), PSTR("?")
PSTR(MSG_START_PRINT), buffer, PSTR("?")
);
}