(svn r1914) - Fix: [ 1119147 ] Stop startup memory corruption crash using optimized MSVC6. MSVC6 workaround as it's too stupid again for its own good
authorDarkvater
Sat, 26 Feb 2005 13:57:40 +0000
changeset 1410 3b5f94893633
parent 1409 889fbc489cd7
child 1411 53935a3bcea0
(svn r1914) - Fix: [ 1119147 ] Stop startup memory corruption crash using optimized MSVC6. MSVC6 workaround as it's too stupid again for its own good
map.c
--- a/map.c	Thu Feb 24 22:37:35 2005 +0000
+++ b/map.c	Sat Feb 26 13:57:40 2005 +0000
@@ -25,8 +25,9 @@
 
 	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();