diff --git a/src/linkgraph/flowmapper.cpp b/src/linkgraph/flowmapper.cpp index 79e03b0123..b7a43f2562 100644 --- a/src/linkgraph/flowmapper.cpp +++ b/src/linkgraph/flowmapper.cpp @@ -53,7 +53,7 @@ void FlowMapper::Run(LinkGraphJob &job) const /* Scale by time the graph has been running without being compressed. Add 1 to avoid * division by 0 if spawn date == last compression date. This matches * LinkGraph::Monthly(). */ - uint runtime = _scaled_date_ticks - job.LastCompression() + 1; + uint runtime = ClampTo(DateTicksToScaledDateTicks(job.StartDateTicks()) - job.LastCompression() + 1); for (auto &it : flows) { it.ScaleToMonthly(runtime); } diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index 9770bdd6c7..ddd1113653 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -346,7 +346,7 @@ public: * Get the date when the underlying link graph was last compressed. * @return Compression date. */ - inline Date LastCompression() const { return this->link_graph.LastCompression(); } + inline DateTicksScaled LastCompression() const { return this->link_graph.LastCompression(); } /** * Get the ID of the underlying link graph.