mirror of
https://github.com/neovim/neovim.git
synced 2026-05-07 00:40:20 -04:00
vim-patch:8.2.3767: crash when using NULL partial
Problem: Crash when using NULL partial. Solution: Check for NULL. https://github.com/vim/vim/commit/e8a92b6166e32f8e583e01c9f541cf81cf76f8e6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -354,7 +354,7 @@ static int TYPVAL_ENCODE_CONVERT_ONE_VALUE(
|
||||
partial_T *const pt = tv->vval.v_partial;
|
||||
char *const fun = pt == NULL ? NULL : partial_name(pt);
|
||||
// When using uf_name prepend "g:" for a global function.
|
||||
const char *const prefix = fun != NULL && pt->pt_name == NULL
|
||||
const char *const prefix = fun != NULL && pt != NULL && pt->pt_name == NULL
|
||||
&& ASCII_ISUPPER(fun[0]) ? "g:" : "";
|
||||
(void)prefix;
|
||||
TYPVAL_ENCODE_CONV_FUNC_START(tv, fun, prefix);
|
||||
|
||||
Reference in New Issue
Block a user