Просмотр исходного кода

use new instance of neighbour info object when removing neighbour

liamcottle 11 месяцев назад
Родитель
Сommit
c49ecc121e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/simple_repeater/main.cpp

+ 1 - 1
examples/simple_repeater/main.cpp

@@ -724,7 +724,7 @@ public:
     for (int i = 0; i < MAX_NEIGHBOURS; i++) {
       NeighbourInfo* neighbour = &neighbours[i];
       if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){
-        neighbours[i] = {}; // clear neighbour entry
+        neighbours[i] = NeighbourInfo(); // clear neighbour entry
       }
     }
 #endif