From 5382abe75bbd1689aca8c922fbf084af9f6bd723 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 4 Feb 2004 04:09:26 +0000 Subject: [PATCH] (render_strip) Fix bug that sometimes caused joined text in joined cells to be rendered outside box boundaries. --- src/ChangeLog | 4 ++++ src/tab.c | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b4e2d954..7b5fb3d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +Tue Feb 3 20:09:54 2004 Ben Pfaff + + * tab.c: (render_strip) Fix bug that sometimes caused joined text + in joined cells to be rendered outside box boundaries. Tue Feb 3 18:56:45 WST 2004 John Darrington diff --git a/src/tab.c b/src/tab.c index 3a8fef01..3166740f 100644 --- a/src/tab.c +++ b/src/tab.c @@ -1340,8 +1340,7 @@ render_strip (int x, int y, int r, int c1, int c2, int r1 unused, int r2) { j->hit = tab_hit; - if (j->x1 == c / 2 && j->y1 == r / 2 - && j->x2 <= c2 && j->y2 <= r2) + if (j->x1 == c / 2 && j->y1 == r / 2) { struct outp_text text; @@ -1355,15 +1354,15 @@ render_strip (int x, int y, int r, int c1, int c2, int r1 unused, int r2) int c; for (c = j->x1, text.h = -t->wrv[j->x2]; - c < j->x2; c++) - text.h += t->w[c] + t->wrv[c + 1]; + c < j->x2 && c < c2 / 2; c++) + text.h += t->w[c] + t->wrv[c + 1]; } { int r; for (r = j->y1, text.v = -t->hrh[j->y2]; - r < j->y2; r++) + r < j->y2 && r < r2 / 2; r++) text.v += t->h[r] + t->hrh[r + 1]; } d->class->text_draw (d, &text); -- 2.30.2