Patch 9.0.0057
Problem: has('patch-xxx') returns true.
Solution: Check for digit. (closes #10751)
Files: src/evalfunc.c, src/testdir/test_expr.vim
*** ../vim-9.0.0056/src/evalfunc.c 2022-06-29 18:39:05.015841419 +0100
--- src/evalfunc.c 2022-07-18 20:45:40.400678621 +0100
***************
*** 6473,6479 ****
|| (minor == VIM_VERSION_MINOR
&& has_patch(atoi((char *)name + 10))))));
}
! else
n = has_patch(atoi((char *)name + 5));
}
else if (STRICMP(name, "vim_starting") == 0)
--- 6473,6479 ----
|| (minor == VIM_VERSION_MINOR
&& has_patch(atoi((char *)name + 10))))));
}
! else if (isdigit(name[5]))
n = has_patch(atoi((char *)name + 5));
}
else if (STRICMP(name, "vim_starting") == 0)
*** ../vim-9.0.0056/src/testdir/test_expr.vim 2022-05-22 19:48:17.000000000
+0100
--- src/testdir/test_expr.vim 2022-07-18 20:45:01.544747944 +0100
***************
*** 41,46 ****
--- 41,47 ----
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()
*** ../vim-9.0.0056/src/version.c 2022-07-18 17:48:46.380542879 +0100
--- src/version.c 2022-07-18 20:43:32.352906890 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 57,
/**/
--
A fool learns from his mistakes, a wise man from someone else's.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/20220718201621.6BA9B1C08FD%40moolenaar.net.