From ee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d Mon Sep 17 00:00:00 2001 From: michi_cc Date: Thu, 5 Jan 2012 19:40:34 +0000 Subject: (svn r23758) -Feature: [NewGRF] Alternate rail type label list. --- src/rail_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/rail_cmd.cpp') diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 8d3dec5e5..49a58fe6d 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -99,6 +99,9 @@ RailType AllocateRailType(RailTypeLabel label) /* Set up new rail type */ memcpy(rti, &_railtypes[RAILTYPE_RAIL], sizeof(*rti)); rti->label = label; + /* Clear alternate label list. Can't use Reset() here as that would free + * the data pointer of RAILTYPE_RAIL and not our new rail type. */ + new (&rti->alternate_labels) RailTypeLabelList; /* Make us compatible with ourself. */ rti->powered_railtypes = (RailTypes)(1 << rt); -- cgit v1.2.3-70-g09d2