patch 9.0.0057: has('patch-xxx') returns true
Problem: has('patch-xxx') returns true.
Solution: Check for digit. (closes #10751)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index f51aade..580f5d1 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -6473,7 +6473,7 @@
|| (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
index ffac6df..f911cd9 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -41,6 +41,7 @@
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
index 87a8d10..ee421e4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 57,
+/**/
56,
/**/
55,