(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.

This commit is contained in:
peter1138 2008-06-03 09:58:13 +00:00
parent a315054443
commit 76bae9f8dd

View File

@ -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;