patch 8.2.3436: check for optional bool type has confusing return type
Problem: Check for optional bool type has confusing return type.
Solution: Explicitly return OK.
diff --git a/src/typval.c b/src/typval.c
index 5fb98eb..3a0e2e5 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -459,13 +459,15 @@
}
/*
- * Check for an optional bool argument at 'idx'
+ * 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)
{
- return (args[idx].v_type == VAR_UNKNOWN
- || check_for_bool_arg(args, idx) != FAIL);
+ if (args[idx].v_type == VAR_UNKNOWN)
+ return OK;
+ return check_for_bool_arg(args, idx);
}
/*
diff --git a/src/version.c b/src/version.c
index 8973e48..6fd967c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3436,
+/**/
3435,
/**/
3434,