From 2f6a46632aaf0cef6deefe8285bc94e963f7e7a1 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 22 Mar 2007 23:32:24 +0000 Subject: (svn r9412) -Fix (r8886): When looking up a cargo type by label skip disabled cargos --- src/cargotype.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cargotype.cpp') diff --git a/src/cargotype.cpp b/src/cargotype.cpp index d89972c31..bea8edd65 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -64,6 +64,7 @@ bool CargoSpec::IsValid() const CargoID GetCargoIDByLabel(CargoLabel cl) { for (CargoID c = 0; c < lengthof(_cargo); c++) { + if (_cargo[c].bitnum == INVALID_CARGO) continue; if (_cargo[c].label == cl) return c; } -- cgit v1.2.3-54-g00ecf