From 02d9ecde6d54fda2a43d24acba8a90ee608c939a Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 25 Mar 2012 18:18:35 +0000 Subject: (svn r24063) -Fix [FS#5125]: with certain versions of GCC and compiler flags the compiler could reorder some code badly causing the 32bpp depot flag not working --- src/newgrf.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 27fe019bc..1f796b258 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6688,13 +6688,12 @@ static void ParamSet(ByteReader *buf) break; case 0x9E: // Miscellaneous GRF features - _misc_grf_features = res; - /* Set train list engine width */ - _cur.grffile->traininfo_vehicle_width = HasGrfMiscBit(GMB_TRAIN_WIDTH_32_PIXELS) ? VEHICLEINFO_FULL_VEHICLE_WIDTH : TRAININFO_DEFAULT_VEHICLE_WIDTH; - + _cur.grffile->traininfo_vehicle_width = HasBit(res, GMB_TRAIN_WIDTH_32_PIXELS) ? VEHICLEINFO_FULL_VEHICLE_WIDTH : TRAININFO_DEFAULT_VEHICLE_WIDTH; /* Remove the local flags from the global flags */ - ClrBit(_misc_grf_features, GMB_TRAIN_WIDTH_32_PIXELS); + ClrBit(res, GMB_TRAIN_WIDTH_32_PIXELS); + + _misc_grf_features = res; break; case 0x9F: // locale-dependent settings -- cgit v1.2.3-70-g09d2