mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 06:32:06 +00:00
Fix copyPasta in NodeDB (#4538)
This commit is contained in:
parent
710fdbd4e5
commit
9b2ef971c2
@ -556,13 +556,8 @@ void NodeDB::cleanupMeshDB()
|
|||||||
for (int i = 0; i < numMeshNodes; i++) {
|
for (int i = 0; i < numMeshNodes; i++) {
|
||||||
if (meshNodes->at(i).has_user) {
|
if (meshNodes->at(i).has_user) {
|
||||||
if (meshNodes->at(i).user.public_key.size > 0) {
|
if (meshNodes->at(i).user.public_key.size > 0) {
|
||||||
for (int j = 0; j < numMeshNodes; j++) {
|
if (memfll(meshNodes->at(i).user.public_key.bytes, 0, meshNodes->at(i).user.public_key.size)) {
|
||||||
if (meshNodes->at(i).user.public_key.bytes[j] != 0) {
|
meshNodes->at(i).user.public_key.size = 0;
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (j == 31) {
|
|
||||||
meshNodes->at(i).user.public_key.size = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
meshNodes->at(newPos++) = meshNodes->at(i);
|
meshNodes->at(newPos++) = meshNodes->at(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user