fixed crash bug when executing command 'print editorsetup.conf'
[rocksndiamonds.git] / src / editor.c
index 16d7d61c73bda9248731d3c2e83040d6a6dc8b72..e714de15eb1a634968cec358c17b4bfc6b24817b 100644 (file)
@@ -5659,7 +5659,7 @@ static void ReinitializeElementList()
 
 void PrintEditorElementList()
 {
-  boolean *stop = &setup.editor.el_user_defined;
+  boolean *stop = &setup_editor_el_user_defined;
   int i, j;
 
   for (i = 0; editor_elements_info[i].setup_value != stop; i++)
@@ -11928,13 +11928,13 @@ static void HandleDrawingAreas(struct GadgetInfo *gi)
   /* also correct MM wall-sized (double) drawing area positions accordingly */
   if (sx2 / 2 < sx || sx2 / 2 > sx)
   {
-    sx2 = sx * 2;
     dx = (sx2 / 2 < sx ? 0 : 1);
+    sx2 = sx * 2 + dx;
   }
   if (sy2 / 2 < sy || sy2 / 2 > sy)
   {
-    sy2 = sy * 2;
     dy = (sy2 / 2 < sy ? 0 : 1);
+    sy2 = sy * 2 + dy;
   }
 
   if (button_release_event)