Skip to content

Commit 3fb4f47

Browse files
committed
patch 8.1.1708: Coverity warns for using uninitialized variable
Problem: Coverity warns for using uninitialized variable. Solution: Set the start col when col is set.
1 parent cfdbc5a commit 3fb4f47

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/beval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ find_word_under_cursor(
7272
}
7373

7474
col = vcol2col(wp, lnum, col);
75+
scol = col;
7576

7677
if (VIsual_active
7778
&& wp->w_buffer == curwin->w_buffer
@@ -95,6 +96,7 @@ find_word_under_cursor(
9596
lbuf = vim_strnsave(lbuf + spos->col, len);
9697
lnum = spos->lnum;
9798
col = spos->col;
99+
scol = col;
98100
}
99101
else
100102
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static char *(features[]) =
777777

778778
static int included_patches[] =
779779
{ /* Add new patch number below this line */
780+
/**/
781+
1708,
780782
/**/
781783
1707,
782784
/**/

0 commit comments

Comments
 (0)