Skip to content

Commit

Permalink
Fix copyPasta in NodeDB (meshtastic#4538)
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett authored and geeksville committed Aug 28, 2024
1 parent 710fdbd commit 9b2ef97
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,8 @@ void NodeDB::cleanupMeshDB()
for (int i = 0; i < numMeshNodes; i++) {
if (meshNodes->at(i).has_user) {
if (meshNodes->at(i).user.public_key.size > 0) {
for (int j = 0; j < numMeshNodes; j++) {
if (meshNodes->at(i).user.public_key.bytes[j] != 0) {
break;
}
if (j == 31) {
meshNodes->at(i).user.public_key.size = 0;
}
if (memfll(meshNodes->at(i).user.public_key.bytes, 0, meshNodes->at(i).user.public_key.size)) {
meshNodes->at(i).user.public_key.size = 0;
}
}
meshNodes->at(newPos++) = meshNodes->at(i);
Expand Down

0 comments on commit 9b2ef97

Please sign in to comment.