mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-18 23:03:34 +03:00
do check if ssid is an empty String ""
use strdup to save some flash #386 part 2
This commit is contained in:
@ -68,7 +68,7 @@ int ESP8266WiFiClass::begin(const char* ssid, const char *passphrase, int32_t ch
|
||||
mode(WIFI_STA);
|
||||
}
|
||||
|
||||
if(!ssid || strlen(ssid) > 31) {
|
||||
if(!ssid || *ssid == 0x00 || strlen(ssid) > 31) {
|
||||
// fail SSID to long or missing!
|
||||
return WL_CONNECT_FAILED;
|
||||
}
|
||||
@ -154,7 +154,7 @@ void ESP8266WiFiClass::softAP(const char* ssid, const char* passphrase, int chan
|
||||
mode(WIFI_AP);
|
||||
}
|
||||
|
||||
if(!ssid || strlen(ssid) > 31) {
|
||||
if(!ssid || *ssid == 0x00 || strlen(ssid) > 31) {
|
||||
// fail SSID to long or missing!
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user