summaryrefslogtreecommitdiff
path: root/appl/charon
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
parent74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff)
20061220
Diffstat (limited to 'appl/charon')
-rw-r--r--appl/charon/build.b4
-rw-r--r--appl/charon/http.b2
-rw-r--r--appl/charon/layout.b4
3 files changed, 9 insertions, 1 deletions
diff --git a/appl/charon/build.b b/appl/charon/build.b
index cf3a0b09..92ba90aa 100644
--- a/appl/charon/build.b
+++ b/appl/charon/build.b
@@ -2772,6 +2772,10 @@ Tablerow.new(align: Align, bg: Background, flags: byte) : ref Tablerow
Tablecell.new(cellid, rowspan, colspan: int, align: Align, wspec: Dimen,
hspec: int, bg: Background, flags: byte) : ref Tablecell
{
+ if(colspan < 0)
+ colspan = 0;
+ if(rowspan < 0)
+ rowspan = 0;
return ref Tablecell(cellid,
nil, -1, # content, layid
rowspan, colspan, align, flags, wspec, hspec, bg,
diff --git a/appl/charon/http.b b/appl/charon/http.b
index 27c7d695..d1208091 100644
--- a/appl/charon/http.b
+++ b/appl/charon/http.b
@@ -478,7 +478,7 @@ writereq(nc: ref Netconn, bs: ref ByteSource)
rv = sys->write(nc.conn.dfd, req.body, len req.body);
}
if(rv < 0) {
- err = "error writing to host";
+ err = sys->sprint("error writing to host: %r");
#constate("writereq", nc.conn);
}
if(err != "") {
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;