summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-02-26 13:57:40 +0000
committerDarkvater <Darkvater@openttd.org>2005-02-26 13:57:40 +0000
commit29ddbfab90071f32d38d0354a3cf760174422228 (patch)
tree263d95535098c7230feb1f0078253eefb9f2f47a
parent3b8feb2aa8f7264746d0757acd0a5aa1e3d1f600 (diff)
downloadopenttd-29ddbfab90071f32d38d0354a3cf760174422228.tar.xz
(svn r1914) - Fix: [ 1119147 ] Stop startup memory corruption crash using optimized MSVC6. MSVC6 workaround as it's too stupid again for its own good
-rw-r--r--map.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/map.c b/map.c
index 64525ef1c..14d948cc7 100644
--- a/map.c
+++ b/map.c
@@ -25,8 +25,9 @@ void InitMap(uint log_x, uint log_y)
DEBUG(map, 1)("Allocating map of size %dx%d", log_x, log_y);
- _map_log_x = log_x;
- _map_log_y = log_y;
+ // XXX - MSVC6 volatile workaround
+ *(volatile uint*)&_map_log_x = log_x;
+ *(volatile uint*)&_map_log_y = log_y;
map_size = MapSize();