(svn r9412) -Fix (r8886): When looking up a cargo type by label skip disabled cargos

This commit is contained in:
peter1138 2007-03-22 23:32:24 +00:00
parent 4d81a464e2
commit 2f6a46632a
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}