From 2577cfd66c5a2b8c427177706d19a56a742820ee Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Tue, 6 Jul 2021 15:00:52 +0200 Subject: [PATCH] Avoid crashing on SSID containing %p --- gui/source/menus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/source/menus.c b/gui/source/menus.c index ef38fce..5b1be9a 100644 --- a/gui/source/menus.c +++ b/gui/source/menus.c @@ -187,7 +187,7 @@ static void Menu_WiFi(void) Draw_Text(20, 30, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 1:"); if (R_SUCCEEDED(ACI_GetSSID(ssid))) - Menu_DrawItem(20, 46, 0.45f, "SSID:", ssid); + Menu_DrawItem(20, 46, 0.45f, "SSID:", "%s", ssid); if (R_SUCCEEDED(ACI_GetPassphrase(passphrase))) Menu_DrawItem(20, 62, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode()); @@ -210,7 +210,7 @@ static void Menu_WiFi(void) Draw_Text(20, 98, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 2:"); if (R_SUCCEEDED(ACI_GetSSID(ssid))) - Menu_DrawItem(20, 114, 0.45f, "SSID:", ssid); + Menu_DrawItem(20, 114, 0.45f, "SSID:", "%s", ssid); if (R_SUCCEEDED(ACI_GetPassphrase(passphrase))) Menu_DrawItem(20, 130, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode()); @@ -233,7 +233,7 @@ static void Menu_WiFi(void) Draw_Text(20, 166, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 3:"); if (R_SUCCEEDED(ACI_GetSSID(ssid))) - Menu_DrawItem(20, 182, 0.45f, "SSID:", ssid); + Menu_DrawItem(20, 182, 0.45f, "SSID:", "%s", ssid); if (R_SUCCEEDED(ACI_GetPassphrase(passphrase))) Menu_DrawItem(20, 198, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode());