diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-31 14:11:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-31 14:11:58 +0200 |
commit | b54c3ff3174dbb5dfbfcabdf95200b047beaa644 (patch) | |
tree | a230032c07f9373c65ca64e4b9c237e70b4d6a54 /src/evalfunc.c | |
parent | fc1f2015e833e69b89b994faf4b2c4fc1e09220f (diff) |
patch 7.4.2134v7.4.2134
Problem: No error for using function() badly.
Solution: Check for passing wrong function name. (Ken Takata)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 9905d0ba74..13864ea3a7 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2845,7 +2845,7 @@ f_exists(typval_T *argvars, typval_T *rettv) } else if (*p == '*') /* internal or user defined function */ { - n = function_exists(p + 1); + n = function_exists(p + 1, FALSE); } else if (*p == ':') { @@ -3577,7 +3577,7 @@ f_function(typval_T *argvars, typval_T *rettv) EMSG2(_(e_invarg2), s); /* Don't check an autoload name for existence here. */ else if (use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL - && !function_exists(s)) + && !function_exists(s, TRUE)) EMSG2(_("E700: Unknown function: %s"), s); else { |