mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-09-05 17:15:43 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue