(svn r2552) - Fix: [map] Fix so the code compiles correctly and doesn't crash on MSVC6 in optimization mode.
authorludde
Tue, 12 Jul 2005 19:57:41 +0000
changeset 2043 20323c1fdb81
parent 2042 d4d6989766e5
child 2044 68ec4a2f2d79
(svn r2552) - Fix: [map] Fix so the code compiles correctly and doesn't crash on MSVC6 in optimization mode.
map.c
--- a/map.c	Tue Jul 12 19:51:58 2005 +0000
+++ b/map.c	Tue Jul 12 19:57:41 2005 +0000
@@ -25,11 +25,11 @@
 
 	DEBUG(map, 1)("Allocating map of size %dx%d", log_x, log_y);
 
-	// XXX - MSVC6 volatile workaround
-	*(volatile uint*)&_map_log_x = log_x;
-	*(volatile uint*)&_map_log_y = log_y;
+	_map_log_x = log_x;
+	_map_log_y = log_y;
 
-	map_size = MapSize();
+	// XXX - MSVC6 workaround
+	map_size = 1 << (log_x + log_y);
 
 	_map_type_and_height =
 		realloc(_map_type_and_height, map_size * sizeof(_map_type_and_height[0]));