(svn r7328) -Fix: memory corruption. The 'Load Heightmap' window does not have TerraGenesis configuration buttons and it does have only 29 widgets, not at least 33. Thanks to Tefad for finding this bug.
authorrubidium
Sun, 03 Dec 2006 13:06:49 +0000
changeset 5213 f5234ffd2cc4
parent 5212 08a0e586ca32
child 5214 62a0325b53c7
(svn r7328) -Fix: memory corruption. The 'Load Heightmap' window does not have TerraGenesis configuration buttons and it does have only 29 widgets, not at least 33. Thanks to Tefad for finding this bug.
genworld_gui.c
--- a/genworld_gui.c	Sun Dec 03 12:17:35 2006 +0000
+++ b/genworld_gui.c	Sun Dec 03 13:06:49 2006 +0000
@@ -206,8 +206,10 @@
 
 	case WE_PAINT:
 		/* You can't select smoothness if not terragenesis */
-		SetWindowWidgetDisabledState(w, 32, _patches_newgame.land_generator == 0);
-		SetWindowWidgetDisabledState(w, 33, _patches_newgame.land_generator == 0);
+		if (mode == GLWP_GENERATE) {
+			SetWindowWidgetDisabledState(w, 32, _patches_newgame.land_generator == 0);
+			SetWindowWidgetDisabledState(w, 33, _patches_newgame.land_generator == 0);
+		}
 		/* Disable snowline if not hilly */
 		SetWindowWidgetDisabledState(w, 22, _opt_newgame.landscape != LT_HILLY);
 		/* Disable town and industry in SE */