To: vim_dev@googlegroups.com Subject: Patch 9.0.0057 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///