1
0
forked from aniani/vim

patch 7.4.719

Problem:    Overflow when adding MAXCOL to a pointer.
Solution:   Subtract pointers instead. (James McCoy)
This commit is contained in:
Bram Moolenaar
2015-05-04 16:10:26 +02:00
parent 81278efadf
commit c4dc286fe6
2 changed files with 3 additions and 1 deletions

View File

@@ -4341,7 +4341,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
|| (mb_utf8 && mb_c == 160)
#endif
) && lcs_nbsp)
|| (c == ' ' && lcs_space && ptr <= line + trailcol)))
|| (c == ' ' && lcs_space && ptr - line <= trailcol)))
{
c = (c == ' ') ? lcs_space : lcs_nbsp;
if (area_attr == 0 && search_attr == 0)