diff options
author | Andrea Cedraro <a.cedraro@gmail.com> | 2015-06-10 14:58:03 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-06-14 02:23:09 -0400 |
commit | 8992f8b1c7388f4a30315d647244f00f09861ec7 (patch) | |
tree | 62c0af2451efb9c90e9e67b025ea1dcac7e0edc3 | |
parent | f04bc91c2ff50e5b85ec3b5838f52d0019640616 (diff) | |
download | rneovim-8992f8b1c7388f4a30315d647244f00f09861ec7.tar.gz rneovim-8992f8b1c7388f4a30315d647244f00f09861ec7.tar.bz2 rneovim-8992f8b1c7388f4a30315d647244f00f09861ec7.zip |
vim-patch:7.4.719 #2817
Problem: Overflow when adding MAXCOL to a pointer.
Solution: Subtract pointers instead. (James McCoy)
https://github.com/vim/vim/commit/v7-4-719
-rw-r--r-- | src/nvim/screen.c | 2 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 7a6e3c59c0..43cb6f4878 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3173,7 +3173,7 @@ win_line ( // 'list': change char 160 to lcs_nbsp and space to lcs_space. if (wp->w_p_list && (((c == 160 || (mb_utf8 && mb_c == 160)) && 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) { n_attr = 1; diff --git a/src/nvim/version.c b/src/nvim/version.c index d43108d29a..e7ba6b6153 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -90,7 +90,7 @@ static int included_patches[] = { //722, //721, //720 NA - //719, + 719, //718, //717, //716, |