diff --git a/src/modules/pwnagotchi/pwngrid.cpp b/src/modules/pwnagotchi/pwngrid.cpp index 6ac1fd8e..d3e07828 100644 --- a/src/modules/pwnagotchi/pwngrid.cpp +++ b/src/modules/pwnagotchi/pwngrid.cpp @@ -39,7 +39,7 @@ void add_new_peer(DynamicJsonDocument &json, signed int rssi) { peer.timestamp = json["timestamp"].as(); peer.uptime = json["uptime"].as(); peer.version = json["version"].as(); - pwngrid_last_friend_name = pwngrid_peers[pwngrid_friends_tot].name; + // Check if it exists in the list bool exists=false; for(auto peer_list:pwngrid_peers) {