Skip to content

Commit

Permalink
correct ssid access for some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Nov 14, 2024
1 parent f234c27 commit efb6f43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/network_interfaces/Wippersnapper_AIRLIFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ bool check_valid_ssid() {

// Store the scanned networks in the vector
for (int i = 0; i < n; ++i) {
strncpy(networks[i].ssid, WiFi.SSID(i).c_str(), sizeof(networks[i].ssid) - 1);
strncpy(networks[i].ssid, WiFi.SSID(i), sizeof(networks[i].ssid) - 1);
networks[i].ssid[sizeof(networks[i].ssid) - 1] = '\0'; // Ensure null termination
networks[i].rssi = WiFi.RSSI(i);
}
Expand Down
2 changes: 1 addition & 1 deletion src/network_interfaces/Wippersnapper_WIFININA.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Wippersnapper_WIFININA : public Wippersnapper {

// Store the scanned networks in the vector
for (int i = 0; i < n; ++i) {
strncpy(networks[i].ssid, WiFi.SSID(i).c_str(), sizeof(networks[i].ssid) - 1);
strncpy(networks[i].ssid, WiFi.SSID(i), sizeof(networks[i].ssid) - 1);
networks[i].ssid[sizeof(networks[i].ssid) - 1] = '\0'; // Ensure null termination
networks[i].rssi = WiFi.RSSI(i);
}
Expand Down
2 changes: 1 addition & 1 deletion src/network_interfaces/ws_networking_pico.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class ws_networking_pico : public Wippersnapper {
// Store the scanned networks in the vector
for (int i = 0; i < n; ++i)
{
strncpy(networks[i].ssid, WiFi.SSID(i).c_str(), sizeof(networks[i].ssid) - 1);
strncpy(networks[i].ssid, WiFi.SSID(i), sizeof(networks[i].ssid) - 1);
networks[i].ssid[sizeof(networks[i].ssid) - 1] = '\0'; // Ensure null termination
networks[i].rssi = WiFi.RSSI(i);
}
Expand Down

0 comments on commit efb6f43

Please sign in to comment.