Fencepost error in network data entry
authorRichard Whitehouse <github@richardwhiuk.com>
Sat, 16 Apr 2011 17:15:04 +0000 (18:15 +0100)
committerRichard Whitehouse <github@richardwhiuk.com>
Sat, 16 Apr 2011 17:15:04 +0000 (18:15 +0100)
src/simulation/simulation.cc

index 5403c2804630c408aa5d3bbc271826e7f5f79af7..131089fe908bd3900b94868b632bfac969013e1c 100644 (file)
@@ -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");
                        }