Browse Source

Fix variable shadowing bug.

Adam Ierymenko 6 years ago
parent
commit
0e7df129d8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      root/root.cpp

+ 2 - 2
root/root.cpp

@@ -142,7 +142,7 @@ struct RendezvousKey
  */
  */
 struct RootPeer
 struct RootPeer
 {
 {
-	ZT_ALWAYS_INLINE RootPeer() : lastSend(0),lastReceive(0),lastSync(0),lastEcho(0),lastHello(0),vMajor(-1),vMinor(-1),vRev(-1) {}
+	ZT_ALWAYS_INLINE RootPeer() : lastSend(0),lastReceive(0),lastSync(0),lastEcho(0),lastHello(0),vMajor(-1),vMinor(-1),vRev(-1),sibling(false) {}
 	ZT_ALWAYS_INLINE ~RootPeer() { Utils::burn(key,sizeof(key)); }
 	ZT_ALWAYS_INLINE ~RootPeer() { Utils::burn(key,sizeof(key)); }
 
 
 	Identity id;            // Identity
 	Identity id;            // Identity
@@ -747,7 +747,7 @@ int main(int argc,char **argv)
 	try {
 	try {
 		auto sibs = config["siblings"];
 		auto sibs = config["siblings"];
 		if (sibs.is_array()) {
 		if (sibs.is_array()) {
-			for(long i=0;i<(long)siblings.size();++i) {
+			for(long i=0;i<(long)sibs.size();++i) {
 				auto sib = sibs[i];
 				auto sib = sibs[i];
 				if (sib.is_object()) {
 				if (sib.is_object()) {
 					std::string idStr = sib["id"];
 					std::string idStr = sib["id"];