Mercurial > hg > openttd
changeset 14214:a67c38f4d927 draft
(svn r18765) -Fix [FS#3499] (r18750): crash when trying to show cargo payments when there are 'holes' in the cargospec array
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 09 Jan 2010 14:57:03 +0000 |
parents | 41b2e7bf03da |
children | 49a7ff168faf |
files | src/graph_gui.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -826,7 +826,7 @@ 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++; } }