branch | cpp_gui |
changeset 6303 | 84c215fc8eb8 |
parent 6268 | 4b5241e5dd10 |
child 6307 | f40e88cff863 |
--- a/src/cargotype.cpp Mon Mar 26 21:31:37 2007 +0000 +++ b/src/cargotype.cpp Mon Mar 26 22:15:38 2007 +0000 @@ -12,7 +12,7 @@ #include "table/cargo_const.h" -static CargoSpec _cargo[NUM_CARGO]; +CargoSpec _cargo[NUM_CARGO]; static const byte INVALID_CARGO = 0xFF; @@ -64,6 +64,7 @@ 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; }