summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-07 13:26:39 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-07 13:26:39 +0100
commit4087bfd96d0d70791a1572ac4b40d5a655e2166b (patch)
treec8128ccf9361f909242c2d99a8e716dd0e5d8513 /src/gui.c
parent20091c18c40b4e8b594769ba11e81d133c479d7c (diff)
patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticedv8.1.0567
Problem: Error for NUL byte in ScreenLines goes unnoticed. Solution: Add an internal error message.
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui.c b/src/gui.c
index b961108ed8..9291366e12 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -2753,9 +2753,15 @@ gui_redraw_block(
}
else if (enc_utf8)
{
- // FIXME: how can the first character ever be zero?
- if (col1 > 0 && ScreenLines[off + col1] == 0)
- --col1;
+ if (ScreenLines[off + col1] == 0)
+ {
+ if (col1 > 0)
+ --col1;
+ else
+ // FIXME: how can the first character ever be zero?
+ IEMSGN("INTERNAL ERROR: NUL in ScreenLines in row %ld",
+ gui.row);
+ }
# ifdef FEAT_GUI_GTK
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
++col2;