From 7ff95b9e97707b192754f1bdea93cc4efac010f1 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 3 Jan 2012 22:36:35 +0000 Subject: (svn r23744) -Fix (r23142) [FS#4923]: Check the version of the right GRF. --- src/train_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index a5964e927..e17521ad6 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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); -- cgit v1.2.3-70-g09d2