mirror of
https://github.com/vim/vim.git
synced 2025-09-09 22:23:37 -04:00
patch 8.1.1749: Coverity warns for using negative index
Problem: Coverity warns for using negative index. Solution: Move using index inside "if".
This commit is contained in:
parent
74da39373c
commit
736cd2cfbe
@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1749,
|
||||||
/**/
|
/**/
|
||||||
1748,
|
1748,
|
||||||
/**/
|
/**/
|
||||||
|
@ -1420,9 +1420,9 @@ read_viminfo_search_pattern(vir_T *virp, int force)
|
|||||||
else if (lp[0] == 'H') // ~H: 'hlsearch' highlighting on
|
else if (lp[0] == 'H') // ~H: 'hlsearch' highlighting on
|
||||||
hlsearch_on = TRUE;
|
hlsearch_on = TRUE;
|
||||||
#endif
|
#endif
|
||||||
spat = get_spat(idx);
|
|
||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
{
|
{
|
||||||
|
spat = get_spat(idx);
|
||||||
if (force || spat->pat == NULL)
|
if (force || spat->pat == NULL)
|
||||||
{
|
{
|
||||||
val = viminfo_readstring(virp, (int)(lp - virp->vir_line + 1),
|
val = viminfo_readstring(virp, (int)(lp - virp->vir_line + 1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user