From cc28e19052b0bad643bbc54e832dcdb9f6f898fd Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 11 Jan 2026 00:03:56 +0000 Subject: [PATCH] Fix #15079: Incorrect dates shown on town cargo history graph. (#15080) --- src/graph_gui.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 95dec25d06..543f7a2055 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1866,7 +1866,6 @@ struct TownCargoGraphWindow : BaseCargoGraphWindow { this->num_on_x_axis = GRAPH_NUM_MONTHS; this->num_vert_lines = GRAPH_NUM_MONTHS; this->month_increment = 1; - this->x_values_reversed = true; this->x_values_increment = ECONOMY_MONTH_MINUTES; this->draw_dates = !TimerGameEconomy::UsingWallclockUnits(); this->ranges = RANGE_LABELS; @@ -1905,7 +1904,7 @@ struct TownCargoGraphWindow : BaseCargoGraphWindow { void UpdateStatistics(bool initialize) override { - int mo = TimerGameEconomy::month - this->num_vert_lines; + int mo = (TimerGameEconomy::month / this->month_increment - this->num_vert_lines) * this->month_increment; auto yr = TimerGameEconomy::year; while (mo < 0) { yr--;