From: Richard Whitehouse Date: Sat, 16 Apr 2011 17:15:04 +0000 (+0100) Subject: Fencepost error in network data entry X-Git-Url: https://git.richardwhiuk.com/?a=commitdiff_plain;h=f303a74700d6d225baa21c01f0b338f5981261d0;p=ns-moose.git Fencepost error in network data entry --- diff --git a/src/simulation/simulation.cc b/src/simulation/simulation.cc index 5403c28..131089f 100644 --- a/src/simulation/simulation.cc +++ b/src/simulation/simulation.cc @@ -68,11 +68,11 @@ void setup(LinkLayerHelper::Network& n, Topology& t, std::istream& file){ if(file.good()){ - if(source > t.hosts){ + if(source >= t.hosts){ throw new std::runtime_error("Invalid Source in Network Data"); } - if(destination > t.hosts){ + if(destination >= t.hosts){ throw new std::runtime_error("Invalid Destination in Network Data"); }