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/if_lua.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/if_lua.c')
-rw-r--r-- | src/if_lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/if_lua.c b/src/if_lua.c index 45f233fdec..6559550815 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -2776,11 +2776,11 @@ luaV_call_lua_func( if (lua_pcall(funcstate->L, luaargcount, 1, 0)) { luaV_emsg(funcstate->L); - return FCERR_OTHER; + return (int)FCERR_OTHER; } luaV_checktypval(funcstate->L, -1, rettv, "get return value"); - return FCERR_NONE; + return (int)FCERR_NONE; } /* |