diff --git a/src/helper/ns2-mobility-helper.cc b/src/helper/ns2-mobility-helper.cc index 67dfd2fe4..96f84ede5 100644 --- a/src/helper/ns2-mobility-helper.cc +++ b/src/helper/ns2-mobility-helper.cc @@ -86,7 +86,7 @@ Ns2MobilityHelper::LayoutObjectStore (const ObjectStore &store) const continue; } Ptr model = GetMobilityModel (line.substr (startNodeId + 1, - endNodeId - startNodeId), + endNodeId - (startNodeId + 1)), store); if (model == 0) {