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

cd6ee69358

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq 2023-10-14 18:39:24 +08:00 committed by GitHub
parent 57ce9b6a92
commit 99b1163b5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);