src/cargotype.cpp
branchgamebalance
changeset 9906 6f41b8713b65
parent 6474 24e7ceeb25f5
child 9599 949374e83b78
--- a/src/cargotype.cpp	Sun Apr 01 09:38:43 2007 +0000
+++ b/src/cargotype.cpp	Thu Apr 19 14:43:25 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;
 	}