Skip to content

Commit

Permalink
fix crash during reset nodedb (#4017)
Browse files Browse the repository at this point in the history
  • Loading branch information
mverch67 authored Jun 2, 2024
1 parent 6ce2fdc commit 2723ae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ void NodeDB::installDefaultChannels()

void NodeDB::resetNodes()
{
clearLocalPosition();
numMeshNodes = 1;
std::fill(devicestate.node_db_lite.begin() + 1, devicestate.node_db_lite.end(), meshtastic_NodeInfoLite());
clearLocalPosition();
saveDeviceStateToDisk();
if (neighborInfoModule && moduleConfig.neighbor_info.enabled)
neighborInfoModule->resetNeighbors();
Expand Down

0 comments on commit 2723ae6

Please sign in to comment.