summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-06-03 09:58:13 +0000
committerpeter1138 <peter1138@openttd.org>2008-06-03 09:58:13 +0000
commit76bae9f8dd8e65ac505b2394aaccfc1ba661f8a4 (patch)
treee11e82d07fca657ab88c3ee1bb1c936a6ab6b283 /src
parenta3150544430e78d35d847a7bf9e38e5833bbfcd2 (diff)
downloadopenttd-76bae9f8dd8e65ac505b2394aaccfc1ba661f8a4.tar.xz
(svn r13371) -Fix (r4510 ... r12924): Engine array size is not related to the ID used when setting a vehicle's name (it is vehicle type specific). Instead just test for a generic string.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index a3de39f51..6576e2185 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3302,7 +3302,7 @@ static void FeatureNewName(byte *buf, size_t len)
case GSF_ROAD:
case GSF_SHIP:
case GSF_AIRCRAFT:
- if (id < GetEnginePoolSize()) {
+ if (!generic) {
Engine *e = GetNewEngine(_cur_grffile, (VehicleType)feature, id);
StringID string = AddGRFString(_cur_grffile->grfid, e->index, lang, new_scheme, name, e->info.string_id);
e->info.string_id = string;