From 94fa190877151c4f07fac2c2984cebda7afee40e Mon Sep 17 00:00:00 2001 From: Lisa Zorn Date: Tue, 15 Nov 2016 13:39:54 -0800 Subject: [PATCH] Fix crashing bug --- src/path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/path.cpp b/src/path.cpp index c10de38c..eca9422c 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -4,6 +4,7 @@ * Path implementation **/ +#include // fmod #include "path.h" #include "pathfinder.h" #include "hyperlink.h" @@ -292,7 +293,7 @@ namespace fasttrips { int transit_stop = (path_spec.outbound_ ? stop_id : stop_state.stop_succpred_); const NamedWeights* named_weights = pf.getNamedWeights( path_spec.user_class_, path_spec.purpose_, MODE_EGRESS, path_spec.egress_mode_, stop_state.trip_id_); - Attributes attributes = *(pf.getAccessAttributes( path_spec.destination_taz_id_, stop_state.trip_id_, transit_stop, dest_arrival_time )); + Attributes attributes = *(pf.getAccessAttributes( path_spec.destination_taz_id_, stop_state.trip_id_, transit_stop, fmod(dest_arrival_time,24.0*60.0))); attributes["preferred_delay_min"] = preference_delay; stop_state.link_cost_ = pf.tallyLinkCost(stop_state.trip_id_, path_spec, trace_file, *named_weights, attributes, hush);