mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-08-11 17:19:24 +02:00
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:
parent
4237f52ee2
commit
822cbbbc8b
@ -1277,7 +1277,7 @@ namespace dbk {
|
|||||||
if (InitializeMenu(screen_width, screen_height)) {
|
if (InitializeMenu(screen_width, screen_height)) {
|
||||||
|
|
||||||
/* Set the update path. */
|
/* 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. */
|
/* Change the menu. */
|
||||||
ChangeMenu(std::make_shared<ValidateUpdateMenu>(g_current_menu));
|
ChangeMenu(std::make_shared<ValidateUpdateMenu>(g_current_menu));
|
||||||
|
Loading…
Reference in New Issue
Block a user