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