diff options
author | frosch <frosch@openttd.org> | 2012-05-25 20:57:36 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-25 20:57:36 +0000 |
commit | 522e5ec86bd9b216e09549ca1d5aba0378e8a95a (patch) | |
tree | df7102293cde02ffd93baadf1c420b8b48333994 /src/newgrf_cargo.cpp | |
parent | b8f6b300d641e091f300db65b8f57bf28cef5974 (diff) | |
download | openttd-522e5ec86bd9b216e09549ca1d5aba0378e8a95a.tar.xz |
(svn r24277) -Codechange: Store cargo and railtype translation tables in a SmallVector.
Diffstat (limited to 'src/newgrf_cargo.cpp')
-rw-r--r-- | src/newgrf_cargo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_cargo.cpp b/src/newgrf_cargo.cpp index f9da37e7b..0c48273cc 100644 --- a/src/newgrf_cargo.cpp +++ b/src/newgrf_cargo.cpp @@ -116,10 +116,10 @@ CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit) /* Other cases use (possibly translated) cargobits */ - if (grffile->cargo_max > 0) { + if (grffile->cargo_list.Length() > 0) { /* ...and the cargo is in bounds, then get the cargo ID for * the label */ - if (cargo < grffile->cargo_max) return GetCargoIDByLabel(grffile->cargo_list[cargo]); + if (cargo < grffile->cargo_list.Length()) return GetCargoIDByLabel(grffile->cargo_list[cargo]); } else { /* Else the cargo value is a 'climate independent' 'bitnum' */ return GetCargoIDByBitnum(cargo); |