mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-24 06:53:46 +00:00
[traffxml] Fix segfault when deleting the last vector element
v.erase(v.end()) is incorrect and will crash on clang but works on gcc Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -779,7 +779,7 @@ void RoutingTraffDecoder::DecodeLocationDirection(traffxml::TraffMessage & messa
|
||||
while(!rsegments.empty() && rsegments.front().GetSegment().GetMwmId() == routing::kFakeNumMwmId)
|
||||
rsegments.erase(rsegments.begin());
|
||||
while(!rsegments.empty() && rsegments.back().GetSegment().GetMwmId() == routing::kFakeNumMwmId)
|
||||
rsegments.erase(rsegments.end());
|
||||
rsegments.pop_back();
|
||||
|
||||
if (!backwards && message.m_location.value().m_at && !message.m_location.value().m_to)
|
||||
// from–at in forward direction, add last segment
|
||||
|
||||
Reference in New Issue
Block a user