To: vim_dev@googlegroups.com Subject: Patch 8.2.3436 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3436 Problem: Check for optional bool type has confusing return type. Solution: Explicitly return OK. Files: src/typval.c *** ../vim-8.2.3435/src/typval.c 2021-08-15 13:49:38.126905573 +0200 --- src/typval.c 2021-09-13 21:35:33.021155844 +0200 *************** *** 459,471 **** } /* ! * Check for an optional bool argument at 'idx' */ int check_for_opt_bool_arg(typval_T *args, int idx) { ! return (args[idx].v_type == VAR_UNKNOWN ! || check_for_bool_arg(args, idx) != FAIL); } /* --- 459,473 ---- } /* ! * Check for an optional bool argument at 'idx'. ! * Return FAIL if the type is wrong. */ int check_for_opt_bool_arg(typval_T *args, int idx) { ! if (args[idx].v_type == VAR_UNKNOWN) ! return OK; ! return check_for_bool_arg(args, idx); } /* *** ../vim-8.2.3435/src/version.c 2021-09-13 18:25:50.456525311 +0200 --- src/version.c 2021-09-13 21:35:49.013141674 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3436, /**/ -- How To Keep A Healthy Level Of Insanity: 8. Don't use any punctuation marks. /// 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 ///