Merge pull request #29 from xfix/network-name-containing-%p

Avoid crashing on SSID containing %p
This commit is contained in:
Joel 2021-07-06 10:40:54 -04:00 committed by GitHub
commit c665eebce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,7 +187,7 @@ static void Menu_WiFi(void)
Draw_Text(20, 30, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 1:"); Draw_Text(20, 30, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 1:");
if (R_SUCCEEDED(ACI_GetSSID(ssid))) 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))) if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
Menu_DrawItem(20, 62, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode()); 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:"); Draw_Text(20, 98, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 2:");
if (R_SUCCEEDED(ACI_GetSSID(ssid))) 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))) if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
Menu_DrawItem(20, 130, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode()); 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:"); Draw_Text(20, 166, 0.45f, MENU_INFO_DESC_COLOUR, "WiFi Slot 3:");
if (R_SUCCEEDED(ACI_GetSSID(ssid))) 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))) if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
Menu_DrawItem(20, 198, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode()); Menu_DrawItem(20, 198, 0.45f, "Pass:", "%s (%s)", display_info? passphrase : NULL, WiFi_GetSecurityMode());