From 0e7df129d8cf84f1c424f3af84431564779d8e5c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 3 Sep 2019 12:51:32 -0700 Subject: [PATCH] Fix variable shadowing bug. --- root/root.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/root.cpp b/root/root.cpp index 530ecec9..8a9324d8 100644 --- a/root/root.cpp +++ b/root/root.cpp @@ -142,7 +142,7 @@ struct RendezvousKey */ 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)); } Identity id; // Identity @@ -747,7 +747,7 @@ int main(int argc,char **argv) try { auto sibs = config["siblings"]; 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]; if (sib.is_object()) { std::string idStr = sib["id"];