summaryrefslogtreecommitdiff
path: root/appl/charon/layout.b
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-23 00:30:12 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-23 00:30:12 +0000
commit6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch)
tree314123bcab78ff295f38f85f31dc141e5fe22d15 /appl/charon/layout.b
parent74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff)
20061220
Diffstat (limited to 'appl/charon/layout.b')
-rw-r--r--appl/charon/layout.b4
1 files changed, 4 insertions, 0 deletions
diff --git a/appl/charon/layout.b b/appl/charon/layout.b
index 6db8f619..ee5c9064 100644
--- a/appl/charon/layout.b
+++ b/appl/charon/layout.b
@@ -2249,6 +2249,8 @@ drawtable(f : ref Frame, parentlay: ref Lay, torigin: Point, tab: ref Table)
clay := f.sublays[c.layid];
if(clay == nil)
continue;
+ if(c.col >= len tab.cols)
+ continue;
cx := x + tab.cols[c.col].pos.x;
cy := y + tab.rows[c.row].pos.y;
wd := cellwidth(tab, c, hsep);
@@ -3304,6 +3306,8 @@ Control.scrollset(c: self ref Control, v1, v2, vmax, nsteps, draw: int)
breadth = sc.r.max.y - sc.r.min.y;
}
l := length - (2*breadth + MINSCR);
+ if(l <= 0)
+ l = 1;
if(l < 0)
CU->raisex("EXInternal: negative scrollbar trough");
sc.top = l*v1/vmax;