aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index 875d7770277..1784b38ba6d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6002,8 +6002,7 @@ get_phys_cursor_glyph (struct window *w)
6002 hpos = row->used[TEXT_AREA] - 1; 6002 hpos = row->used[TEXT_AREA] - 1;
6003 } 6003 }
6004 6004
6005 if (row->used[TEXT_AREA] > hpos 6005 if (hpos >= 0 && hpos < row->used[TEXT_AREA])
6006 && 0 <= hpos)
6007 glyph = row->glyphs[TEXT_AREA] + hpos; 6006 glyph = row->glyphs[TEXT_AREA] + hpos;
6008 else 6007 else
6009 glyph = NULL; 6008 glyph = NULL;