From 7b75cee8762c49e296ebf6cf59d3249cef4d45af Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 3 Jun 2008 09:58:13 +0000 Subject: (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. --- src/newgrf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2