From dd7e988f080c807ff47552b8f2fd014aa2c3d621 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sat, 6 Aug 2016 08:03:57 +0100 Subject: [PATCH] Fix #4231. Ride colour issue caused by overlapping vars. By using a union instead of a struct var_494 and var_496 where ontop of the same location this meant var_496 when written to would overwrite ride_colour that was also in a union with var_494/496. This in turn would cause the wrong ride_colour to be overwritten when using the colour picker. --- src/interface/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/window.h b/src/interface/window.h index b3d9dbddca..7876fa5507 100644 --- a/src/interface/window.h +++ b/src/interface/window.h @@ -282,7 +282,7 @@ typedef struct rct_window { rct_research_item* research_item; rct_object_entry* object_entry; scenario_index_entry* highlighted_scenario; - union { + struct { uint16 var_494; uint16 var_496; };