# HG changeset patch # User Bram Moolenaar # Date 1658174404 -7200 # Node ID 90565e49a13ed30af7f07ffa8ae2f0ce2623ec15 # Parent aeba55253de4e95d31293d4967861df4d2e95291 patch 9.0.0057: has('patch-xxx') returns true Commit: https://github.com/vim/vim/commit/5154a8880034b7bb94186d37bcecc6ee1a96f732 Author: Bram Moolenaar Date: Mon Jul 18 20:48:50 2022 +0100 patch 9.0.0057: has('patch-xxx') returns true Problem: has('patch-xxx') returns true. Solution: Check for digit. (closes https://github.com/vim/vim/issues/10751) diff --git a/src/evalfunc.c b/src/evalfunc.c --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -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) diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -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() diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 57, +/**/ 56, /**/ 55,