fix a build error on 10.5, LandPixels properly initialized
authorkoda
Tue, 23 Mar 2010 21:58:23 +0000
changeset 3055 f542a36ef6c0
parent 3054 3b6b57d8b7cd
child 3056 141c26d2717d
fix a build error on 10.5, LandPixels properly initialized
CMakeLists.txt
hedgewars/uLand.pas
--- a/CMakeLists.txt	Tue Mar 23 21:50:26 2010 +0000
+++ b/CMakeLists.txt	Tue Mar 23 21:58:23 2010 +0000
@@ -57,6 +57,7 @@
 		set(FATAL "Hedgewars is not supported for pre-10.4 systems")
 	endif()
 
+	set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400")
 	if(current_macosx_version MATCHES "10.6")
 		set(CMAKE_OSX_ARCHITECTURES "x86_64")
 	endif()
@@ -67,7 +68,6 @@
 		if(NOT minimum_macosx MATCHES "10.6")
 			set(CMAKE_C_COMPILER "gcc-4.0")
 			set(CMAKE_CXX_COMPILER "g++-4.0")
-			set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400")
 		endif()
 	ENDIF()	
 
--- a/hedgewars/uLand.pas	Tue Mar 23 21:50:26 2010 +0000
+++ b/hedgewars/uLand.pas	Tue Mar 23 21:58:23 2010 +0000
@@ -857,11 +857,12 @@
 procedure initModule;
 begin
     LandBackSurface:= nil;
+    FillChar(LandPixels, sizeof(TLandArray), 0);
 end;
 
 procedure freeModule;
 begin
-    FillChar(LandPixels, sizeof(TLandArray), 0)
+
 end;
 
 end.