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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201907251958.x6PJwXFZ032164%40masaka.moolenaar.net.

Raspunde prin e-mail lui