From 7e6a2a64f09df577f29e024c1d1e6733d6bc1b7c Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Wed, 28 Jul 2021 11:51:48 +0200 Subject: patch 8.2.3232: system() does not work without a second argument Problem: system() does not work without a second argument. Solution: Do not require a second argument. (Yegappan Lakshmanan, closes #8651, closes #8650) --- src/typval.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/typval.c') diff --git a/src/typval.c b/src/typval.c index 34032177d..fb527e988 100644 --- a/src/typval.c +++ b/src/typval.c @@ -726,6 +726,17 @@ check_for_string_or_number_or_list_arg(typval_T *args, int idx) return OK; } +/* + * Give an error and return FAIL unless "args[idx]" is an optional string + * or number or a list + */ + int +check_for_opt_string_or_number_or_list_arg(typval_T *args, int idx) +{ + return (args[idx].v_type == VAR_UNKNOWN + || check_for_string_or_number_or_list_arg(args, idx) != FAIL); +} + /* * Give an error and return FAIL unless "args[idx]" is a string or a list * or a dict. -- cgit v1.2.1