daybreak: fix strncpy compiler warning

GCC warned that the output string would not be nul-terminated if the
input string was too long.  Fix this by subtracting 1 from the size
argument, as is done for other `strncpy` calls in the file.  (It would
probably be better to avoid `strncpy` entirely, but this is just a
simple fix.)
This commit is contained in:
comex 2025-08-08 14:13:09 -07:00 committed by SciresM
parent 4237f52ee2
commit 822cbbbc8b

View File

@ -1277,7 +1277,7 @@ namespace dbk {
if (InitializeMenu(screen_width, screen_height)) {
/* Set the update path. */
strncpy(g_update_path, update_path, sizeof(g_update_path));
strncpy(g_update_path, update_path, sizeof(g_update_path)-1);
/* Change the menu. */
ChangeMenu(std::make_shared<ValidateUpdateMenu>(g_current_menu));