changeset 17419:e685de8a1ac6 v8.1.1708

patch 8.1.1708: Coverity warns for using uninitialized variable commit https://github.com/vim/vim/commit/3fb4f4762b49a5b5a54c17e0296e49ec815aee6c Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 17 21:32:14 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 17 Jul 2019 21:45:04 +0200
parents aa5e36c9f1a1
children 37a230c53b08
files src/beval.c src/version.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
 		    {
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1708,
+/**/
     1707,
 /**/
     1706,