From 6e425a9de8c003b5a733621a6b6730ec3cc902b8 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Sat, 23 Dec 2006 00:30:12 +0000 Subject: 20061220 --- appl/charon/layout.b | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'appl/charon/layout.b') 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; -- cgit v1.2.3