1
0
forked from aniani/vim

patch 9.0.0057: has('patch-xxx') returns true

Problem:    has('patch-xxx') returns true.
Solution:   Check for digit. (closes #10751)
This commit is contained in:
Bram Moolenaar
2022-07-18 20:48:50 +01:00
parent bd683e3a79
commit 5154a88800
3 changed files with 4 additions and 1 deletions

View File

@@ -6473,7 +6473,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|| (minor == VIM_VERSION_MINOR
&& has_patch(atoi((char *)name + 10))))));
}
else
else if (isdigit(name[5]))
n = has_patch(atoi((char *)name + 5));
}
else if (STRICMP(name, "vim_starting") == 0)

View File

@@ -41,6 +41,7 @@ func Test_version()
call assert_false(has('patch-7.4.'))
call assert_false(has('patch-9.1.0'))
call assert_false(has('patch-9.9.1'))
call assert_false(has('patch-abc'))
endfunc
func Test_op_ternary()

View File

@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
57,
/**/
56,
/**/