From ff618230fe59bd889f56d4ace837ffc2445377b1 Mon Sep 17 00:00:00 2001 From: dP Date: Sun, 4 Feb 2024 16:15:24 +0530 Subject: [PATCH] Codechange: Replace magic value with a variable (#11980) --- src/graph_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 45b4ded9ac..da5ba21c53 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1122,7 +1122,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { int i = 0; for (const CargoSpec *cs : _sorted_standard_cargo_specs) { this->colours[i] = cs->legend_colour; - for (uint j = 0; j != 20; j++) { + for (uint j = 0; j != this->num_on_x_axis; j++) { this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, cs->Index()); } i++;