Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/build_config/package/jupedsim/invalid_access.patch
193884 views
1
diff --git a/libsimulator/src/RoutingEngine.cpp b/libsimulator/src/RoutingEngine.cpp
2
index ee3bf96ae..f77dab852 100644
3
--- a/libsimulator/src/RoutingEngine.cpp
4
+++ b/libsimulator/src/RoutingEngine.cpp
5
@@ -303,12 +303,8 @@ RoutingEngine::straightenPath(Point from, Point to, const std::vector<CDT::Face_
6
waypoints.reserve(path.size() + 1);
7
for(size_t index_portal = 1; index_portal <= portalCount; ++index_portal) {
8
const auto face_from = path[index_portal - 1];
9
- const auto face_to = path[index_portal];
10
- if(face_from->neighbor(0) == face_to) {
11
- }
12
-
13
const auto portal =
14
- index_portal < portalCount ? get_edge(face_from, face_to) : LineSegment(to, to);
15
+ index_portal < portalCount ? get_edge(face_from, path[index_portal]) : LineSegment(to, to);
16
17
const auto line_segment_left = portal.p2;
18
const auto line_segment_right = portal.p1;
19
20