(svn r18765) -Fix [FS#3499] (r18750): crash when trying to show cargo payments when there are 'holes' in the cargospec array

This commit is contained in:
rubidium 2010-01-09 14:57:03 +00:00
parent e4af35d316
commit b9052fff9f

View File

@ -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++;
}
}