Skip to content

Commit

Permalink
Both infoids and _ap_password are intialized by check time. (#1344)
Browse files Browse the repository at this point in the history
Comparing it to NULL raises operation overload.
  • Loading branch information
pplanel committed Jan 24, 2022
1 parent 62ba184 commit 9f6dcad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ void WiFiManager::handleInfo() {
#endif

for(size_t i=0; i<infos;i++){
if(infoids[i] != NULL) page += getInfoData(infoids[i]);
if(!infoids[i].isEmpty()) page += getInfoData(infoids[i]);
}
page += F("</dl>");
if(_showInfoUpdate){
Expand Down Expand Up @@ -3227,7 +3227,7 @@ String WiFiManager::toStringIp(IPAddress ip) {

boolean WiFiManager::validApPassword(){
// check that ap password is valid, return false
if (_apPassword == NULL) _apPassword = "";
if (_apPassword.isEmpty()) _apPassword = "";
if (_apPassword != "") {
if (_apPassword.length() < 8 || _apPassword.length() > 63) {
#ifdef WM_DEBUG_LEVEL
Expand Down

0 comments on commit 9f6dcad

Please sign in to comment.