diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-02-18 14:42:44 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-18 14:42:44 +0000 |
commit | 0917e867632199883c07c2d7534f7091b1d12607 (patch) | |
tree | 803dcaf3a0803718b7d08dd6d356132543f5869a /src/evalfunc.c | |
parent | 9de960ace0f017fcfeaf64a2f6492f0f88b11fdb (diff) |
patch 9.0.1320: checking the type of a null object causes a crashv9.0.1320
Problem: Checking the type of a null object causes a crash.
Solution: Don't try to get the class of a null object. (closes #12005)
Handle error from calling a user function better.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 08f88471e3..7f6cbac041 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3056,8 +3056,8 @@ internal_func_is_map(int idx) int check_internal_func(int idx, int argcount) { - int res; - char *name; + funcerror_T res; + char *name; if (argcount < global_functions[idx].f_min_argc) res = FCERR_TOOFEW; @@ -3074,7 +3074,7 @@ check_internal_func(int idx, int argcount) return -1; } - int + funcerror_T call_internal_func( char_u *name, int argcount, @@ -3107,7 +3107,7 @@ call_internal_func_by_idx( /* * Invoke a method for base->method(). */ - int + funcerror_T call_internal_method( char_u *name, int argcount, |