Sorry, can't use ' or " or space.

This commit is contained in:
zogodo
2019-09-29 23:54:53 +08:00
parent af383158d1
commit 19da61cfa6
4 changed files with 31 additions and 17 deletions

View File

@@ -89,9 +89,10 @@ void wifi_scan_callback(ScanResult_adv* scan_ret, void* arg)
char* tmp2 = secs;
for (; i < count; i++)
{
sprintf(tmp1, "'%s',", scan_ret->ApList[i].ssid);
tmp1 += (strlen(scan_ret->ApList[i].ssid) + 3);
char* ssid = scan_ret->ApList[i].ssid;
if (strstr(ssid, "'") || strstr(ssid, "\"")) continue;
sprintf(tmp1, "'%s',", ssid);
tmp1 += (strlen(ssid) + 3);
sprintf(tmp2, "%d,", scan_ret->ApList[i].security);
tmp2 += 2;
}