diff options
Diffstat (limited to 'newgrf.c')
-rw-r--r-- | newgrf.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1761,9 +1761,11 @@ static void VehicleNewName(byte *buf, int len) case GSF_TRAIN: case GSF_ROAD: case GSF_SHIP: - case GSF_AIRCRAFT: - SetCustomEngineName(id, AddGRFString(_cur_grffile->grfid, id, lang, name)); + case GSF_AIRCRAFT: { + StringID string = AddGRFString(_cur_grffile->grfid, id, lang, name); + if (id < TOTAL_NUM_ENGINES) SetCustomEngineName(id, string); break; + } #if 0 case GSF_STATION: |