diff mde/gui/widget/layout.d @ 85:56c0ddd90193

Intermediate commit (not stable). Changes to init system.
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 11 Sep 2008 11:33:51 +0100
parents 79a1809421aa
children b525ff28774b
line wrap: on
line diff
--- a/mde/gui/widget/layout.d	Sun Aug 31 15:59:17 2008 +0100
+++ b/mde/gui/widget/layout.d	Thu Sep 11 11:33:51 2008 +0100
@@ -428,8 +428,10 @@
                 debug assert (i > 0, "getCell: l < pos[0] (code error)");
                 --i;
             }					// now (l >= pos[i])
-            if (l >= pos[i] + width[i])		// between columns
+            if (l >= pos[i] + width[i]) {	// between columns
+                debug assert (i+1 < minWidth.length, "getCell: l >= pos[$-1] + width[$-1] (code error)");
                 return -i - 1;			// note: i might be 0 so cannot just return -i
+            }
             return i;
         }