diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-17 21:32:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-17 21:32:14 +0200 |
commit | 3fb4f4762b49a5b5a54c17e0296e49ec815aee6c (patch) | |
tree | b788c84df7fab189249b4b27ea18624a98d7d14b /src/beval.c | |
parent | cfdbc5adde49cbab939e8164555ed0b8d9ce000b (diff) | |
download | vim-git-3fb4f4762b49a5b5a54c17e0296e49ec815aee6c.tar.gz |
patch 8.1.1708: Coverity warns for using uninitialized variablev8.1.1708
Problem: Coverity warns for using uninitialized variable.
Solution: Set the start col when col is set.
Diffstat (limited to 'src/beval.c')
-rw-r--r-- | src/beval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/beval.c b/src/beval.c index 193964667..3dd9b6770 100644 --- a/src/beval.c +++ b/src/beval.c @@ -72,6 +72,7 @@ find_word_under_cursor( } col = vcol2col(wp, lnum, col); + scol = col; if (VIsual_active && wp->w_buffer == curwin->w_buffer @@ -95,6 +96,7 @@ find_word_under_cursor( lbuf = vim_strnsave(lbuf + spos->col, len); lnum = spos->lnum; col = spos->col; + scol = col; } else { |