@@ -116,10 +116,10 @@ CargoID GetCargoTranslation(uint8 cargo,
/* Other cases use (possibly translated) cargobits */
if (grffile->cargo_max > 0) {
if (grffile->cargo_list.Length() > 0) {
/* ...and the cargo is in bounds, then get the cargo ID for
* the label */
if (cargo < grffile->cargo_max) return GetCargoIDByLabel(grffile->cargo_list[cargo]);
if (cargo < grffile->cargo_list.Length()) return GetCargoIDByLabel(grffile->cargo_list[cargo]);
} else {
/* Else the cargo value is a 'climate independent' 'bitnum' */
return GetCargoIDByBitnum(cargo);