To: vim_dev@googlegroups.com Subject: Patch 8.1.1749 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1749 Problem: Coverity warns for using negative index. Solution: Move using index inside "if". Files: src/viminfo.c *** ../vim-8.1.1748/src/viminfo.c 2019-07-23 22:15:21.311518857 +0200 --- src/viminfo.c 2019-07-25 21:55:48.922146733 +0200 *************** *** 1420,1428 **** else if (lp[0] == 'H') // ~H: 'hlsearch' highlighting on hlsearch_on = TRUE; #endif - spat = get_spat(idx); if (idx >= 0) { if (force || spat->pat == NULL) { val = viminfo_readstring(virp, (int)(lp - virp->vir_line + 1), --- 1420,1428 ---- else if (lp[0] == 'H') // ~H: 'hlsearch' highlighting on hlsearch_on = TRUE; #endif if (idx >= 0) { + spat = get_spat(idx); if (force || spat->pat == NULL) { val = viminfo_readstring(virp, (int)(lp - virp->vir_line + 1), *** ../vim-8.1.1748/src/version.c 2019-07-25 21:52:36.011069577 +0200 --- src/version.c 2019-07-25 21:57:40.697603192 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1749, /**/ -- ARTHUR: ... and I am your king .... OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an autonomous collective ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///