diff options
author | rubidium <rubidium@openttd.org> | 2010-01-09 14:57:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-09 14:57:03 +0000 |
commit | b9052fff9fa4f0c836d4e1d7f85c23c4fb4150a2 (patch) | |
tree | b1f338b5716359626a16da7c95d5f0635bbc7ec2 /src | |
parent | e4af35d316158767ddd19d87ac1c92086be7a71c (diff) | |
download | openttd-b9052fff9fa4f0c836d4e1d7f85c23c4fb4150a2.tar.xz |
(svn r18765) -Fix [FS#3499] (r18750): crash when trying to show cargo payments when there are 'holes' in the cargospec array
Diffstat (limited to 'src')
-rw-r--r-- | src/graph_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index fca74b3b7..4867ffa61 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -826,7 +826,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { int i = 0; const CargoSpec *cs; FOR_ALL_CARGOSPECS(cs) { - this->SetWidgetLoweredState(CPW_CARGO_FIRST + i, !HasBit(_legend_excluded_cargo, i)); + this->SetWidgetLoweredState(CPW_CARGO_FIRST + cs->Index(), !HasBit(_legend_excluded_cargo, i)); i++; } } |