From b0f2ef287e797ed6f9799e8272c91a031bd3d4fa Mon Sep 17 00:00:00 2001 From: Kajari Ghosh Date: Tue, 24 Apr 2018 18:46:37 -0400 Subject: [PATCH] fix the offset case when there is no packed path to unpack --- src/engine/routing_algorithms/many_to_many_ch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/routing_algorithms/many_to_many_ch.cpp b/src/engine/routing_algorithms/many_to_many_ch.cpp index ebe69ea26..f35854998 100644 --- a/src/engine/routing_algorithms/many_to_many_ch.cpp +++ b/src/engine/routing_algorithms/many_to_many_ch.cpp @@ -295,7 +295,7 @@ void calculateDistances(typename SearchEngineData::ManyToManyQuer // entry 0---1---2---3--- <-- 3 is exit node EdgeDistance offset = target_phantom.GetForwardDistance() - source_phantom.GetForwardDistance(); - distances_table[row_index * number_of_targets + column_index] += offset; + distances_table[row_index * number_of_targets + column_index] = offset; } else { @@ -306,7 +306,7 @@ void calculateDistances(typename SearchEngineData::ManyToManyQuer // entry 0---1---2---3--- <-- 3 is exit node EdgeDistance offset = target_phantom.GetReverseDistance() - source_phantom.GetReverseDistance(); - distances_table[row_index * number_of_targets + column_index] += offset; + distances_table[row_index * number_of_targets + column_index] = offset; } } packed_leg.clear();