@@ -85,13 +85,13 @@ void SetupCargoForClimate(LandscapeID l)
* @return ID number if the cargo exists, else #CT_INVALID
*/
CargoID GetDefaultCargoID(LandscapeID l, CargoType ct)
{
assert(l < lengthof(_default_climate_cargo));
if (ct == CT_INVALID) return CT_INVALID;
if (!IsValidCargoType(ct)) return CT_INVALID;
assert(ct < lengthof(_default_climate_cargo[0]));
CargoLabel cl = _default_climate_cargo[l][ct];
/* Bzzt: check if cl is just an index into the cargo table */
if (cl < lengthof(_default_cargo)) {
cl = _default_cargo[cl].label;