From 7c13116007ec1258a6d909ab8c1eaf0f4cfc4169 Mon Sep 17 00:00:00 2001 From: liqinhui Date: Wed, 15 Nov 2023 11:00:42 +0800 Subject: [PATCH] simwifi: Connect the wifi whose ssid contains the special charaters. When setting the essid that contains the special characters (\"'), we need to add an escape (\) for them. Signed-off-by: liqinhui --- arch/sim/src/sim/sim_wifidriver.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/sim/src/sim/sim_wifidriver.c b/arch/sim/src/sim/sim_wifidriver.c index 52aced6e5d..103cfc2fa2 100644 --- a/arch/sim/src/sim/sim_wifidriver.c +++ b/arch/sim/src/sim/sim_wifidriver.c @@ -453,7 +453,12 @@ static int utf8_escape(char *outp, int out_size, switch (*inp) { case '\\': - case '\'': + if (*(inp + 1) == '\'') + { + inp++; + break; + } + case '\"': if (res_size++ >= out_size) {