aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-10-14 18:39:24 +0800
committerGitHub <noreply@github.com>2023-10-14 18:39:24 +0800
commit99b1163b5ae7a2f199803541c09f3da80547b40c (patch)
treeca534c5622e885d2fcf3d32b27c8ec956f1f0052
parent57ce9b6a92977fb11269d99be0bb06eab18eda75 (diff)
downloadrneovim-99b1163b5ae7a2f199803541c09f3da80547b40c.tar.gz
rneovim-99b1163b5ae7a2f199803541c09f3da80547b40c.tar.bz2
rneovim-99b1163b5ae7a2f199803541c09f3da80547b40c.zip
vim-patch:9.0.2021: Coverity complains about change in charset (#25634)
Problem: Coverity complains about change in charset (after v9.0.2017) Solution: check pointer t at index 0 closes: vim/vim#13322 https://github.com/vim/vim/commit/cd6ee6935811ab223605a3f39a550d26a617867d Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--src/nvim/plines.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/plines.c b/src/nvim/plines.c
index 2b8cdd4ad9..64dd3ff4d4 100644
--- a/src/nvim/plines.c
+++ b/src/nvim/plines.c
@@ -345,7 +345,7 @@ int win_lbr_chartabsize(chartabsize_T *cts, int *headp)
// needs a break here
if (wp->w_p_lbr && wp->w_p_wrap && wp->w_width_inner != 0) {
char *t = cts->cts_line;
- while (vim_isbreak((uint8_t)(*t))) {
+ while (vim_isbreak((uint8_t)t[0])) {
t++;
}
vcol_start = (colnr_T)(t - cts->cts_line);