]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/routing/TorusZone.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove an indirection and fix memory leak.
[simgrid.git] / src / kernel / routing / TorusZone.cpp
index 75bd50002782f8f252a7b9a5c1d3f0f2d8a963b3..074d473922e4f1518ec5b3f62170c7685605acb7 100644 (file)
@@ -179,7 +179,7 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg
     std::pair<surf::LinkImpl*, surf::LinkImpl*> info;
 
     if (hasLimiter_) { // limiter for sender
-      info = privateLinks_.at(nodeOffset + hasLoopback_);
+      info = privateLinks_.at(nodeOffset + (hasLoopback_ ? 1 : 0));
       route->link_list->push_back(info.first);
     }