aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-18 01:25:35 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-18 01:25:35 +0000
commit1c97866a5fe52db4f4dc0359fdf115de56838f3d (patch)
tree7eb8abfeb0e18327509db03029e7092de990b3cf
parent063a474fe055cadcb7f7f64e5061ed65d506c407 (diff)
downloadrtmux-1c97866a5fe52db4f4dc0359fdf115de56838f3d.tar.gz
rtmux-1c97866a5fe52db4f4dc0359fdf115de56838f3d.tar.bz2
rtmux-1c97866a5fe52db4f4dc0359fdf115de56838f3d.zip
Sync OpenBSD patchset 542:
A screen can be one cell wide; don't crash if that is the case.
-rw-r--r--screen-write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/screen-write.c b/screen-write.c
index 0e39b03e..88215b51 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1,4 +1,4 @@
-/* $Id: screen-write.c,v 1.84 2009-11-13 16:54:04 tcunha Exp $ */
+/* $Id: screen-write.c,v 1.85 2009-11-18 01:25:35 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -427,8 +427,8 @@ screen_write_initctx(
return;
/* Save the last cell on the screen. */
- gc = NULL;
- for (xx = 1; xx < screen_size_x(s); xx++) {
+ gc = &grid_default_cell;
+ for (xx = 1; xx <= screen_size_x(s); xx++) {
gc = grid_view_peek_cell(gd, screen_size_x(s) - xx, s->cy);
if (!(gc->flags & GRID_FLAG_PADDING))
break;