summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2006-10-12 22:26:42 +0000
committerRich Felker <dalias@aerifal.cx>2006-10-12 22:26:42 +0000
commit366c0fccf55b43ff5051b8172374fb9caf011200 (patch)
treee99b923a1317e6f216157eba29f6709b1dffa7d1
parent8a1935edeac4671fa5fb21273514d75c07db94d4 (diff)
possibly fix crash on last glyph page?
-rw-r--r--xlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlib.c b/xlib.c
index 14a3a13..5ad8469 100644
--- a/xlib.c
+++ b/xlib.c
@@ -147,8 +147,8 @@ int uudisp_open(struct uudisp *d)
XMatchVisualInfo(p->display, p->screen, 1, StaticGray, &vi);
image = XCreateImage(p->display,
- vi.visual, 1, XYBitmap, (-d->cell_w)&7, g,
- d->cell_w, d->cell_h * 1024, 8, 0);
+ vi.visual, 1, XYBitmap, (-d->cell_w)&7, g, d->cell_w,
+ d->cell_h*(i+1<npages ? 1024 : (nglyphs&1023)), 8, 0);
XPutImage(p->display, p->glyph_cache[i], gc, image,
0, 0, 0, 0, d->cell_w, d->cell_h * 1024);