From 54a7e867a723bee2f838ec372c4a57a9141df2d2 Mon Sep 17 00:00:00 2001 From: Valou Date: Mon, 2 Sep 2024 16:25:00 +0200 Subject: [PATCH] Fix peer name allocation preventing new friends --- src/modules/pwnagotchi/pwngrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {