(svn r23744) -Fix (r23142) [FS#4923]: Check the version of the right GRF.

This commit is contained in:
frosch 2012-01-03 22:36:35 +00:00
parent f5ebbc96e9
commit 7ff95b9e97
1 changed files with 1 additions and 1 deletions

View File

@ -992,7 +992,7 @@ static CommandCost CheckTrainAttachment(Train *t)
/* A failing callback means everything is okay */
StringID error = STR_NULL;
if (t->GetGRF()->grf_version < 8) {
if (head->GetGRF()->grf_version < 8) {
if (callback == 0xFD) error = STR_ERROR_INCOMPATIBLE_RAIL_TYPES;
if (callback < 0xFD) error = GetGRFStringID(head->GetGRFID(), 0xD000 + callback);
if (callback >= 0x100) ErrorUnknownCallbackResult(head->GetGRFID(), CBID_TRAIN_ALLOW_WAGON_ATTACH, callback);