Skip to content

Commit 4087bfd

Browse files
committed
patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed
Problem: Error for NUL byte in ScreenLines goes unnoticed. Solution: Add an internal error message.
1 parent 20091c1 commit 4087bfd

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/gui.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,9 +2753,15 @@ gui_redraw_block(
27532753
}
27542754
else if (enc_utf8)
27552755
{
2756-
// FIXME: how can the first character ever be zero?
2757-
if (col1 > 0 && ScreenLines[off + col1] == 0)
2758-
--col1;
2756+
if (ScreenLines[off + col1] == 0)
2757+
{
2758+
if (col1 > 0)
2759+
--col1;
2760+
else
2761+
// FIXME: how can the first character ever be zero?
2762+
IEMSGN("INTERNAL ERROR: NUL in ScreenLines in row %ld",
2763+
gui.row);
2764+
}
27592765
# ifdef FEAT_GUI_GTK
27602766
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
27612767
++col2;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
567,
795797
/**/
796798
566,
797799
/**/

0 commit comments

Comments
 (0)