Fixed garbage returning when no SSID found.

pull/169/head
Hieromon Ikasamo 5 years ago
parent b4682dd8d4
commit 8539f015c3
  1. 1
      src/AutoConnectPage.cpp

@ -1177,6 +1177,7 @@ String AutoConnect::_token_LIST_SSID(PageArgument& args) {
uint8_t validCount = 0; uint8_t validCount = 0;
uint8_t dispCount = 0; uint8_t dispCount = 0;
char* slBuf = ssidList; char* slBuf = ssidList;
*slBuf = '\0';
for (uint8_t i = 0; i < _scanCount; i++) { for (uint8_t i = 0; i < _scanCount; i++) {
String ssid = WiFi.SSID(i); String ssid = WiFi.SSID(i);
if (ssid.length() > 0) { if (ssid.length() > 0) {

Loading…
Cancel
Save