Index: src/newgrf_cargo.cpp =================================================================== --- src/newgrf_cargo.cpp (revision 13776) +++ src/newgrf_cargo.cpp (working copy) @@ -109,9 +109,14 @@ /* Else the cargo value is a 'climate independent' 'bitnum' */ if (HasBit(_cargo_mask, cargo)) return GetCargoIDByBitnum(cargo); } else { - /* If the GRF contains a translation table (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 the GRF contains a translation table... */ + if(grffile->cargo_max > 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]); + } else { + /* Else the cargo value is a 'climate independent' 'bitnum' */ + if (HasBit(_cargo_mask, cargo)) return GetCargoIDByBitnum(cargo); + } } return CT_INVALID; }