]> granicus.if.org Git - vim/commitdiff
patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed v8.1.0567
authorBram Moolenaar <Bram@vim.org>
Fri, 7 Dec 2018 12:26:39 +0000 (13:26 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 7 Dec 2018 12:26:39 +0000 (13:26 +0100)
Problem:    Error for NUL byte in ScreenLines goes unnoticed.
Solution:   Add an internal error message.

src/gui.c
src/version.c

index b961108ed87a4df1253eaf6c080b414d6801380a..9291366e12452d14f92c0f8dcc12ae9c99f60cc8 100644 (file)
--- 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;
index b912a6eec87be6dc846414516c8b82fbdf7f1754..c4d9a8f15096aab024a6a0e759cd0bba2fdc6a21 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    567,
 /**/
     566,
 /**/