forked from aniani/vim
patch 8.2.1802: Vim9: crash with unterminated dict
Problem: Vim9: crash with unterminated dict. (Dhiraj Mishra) Solution: Return empty string instead of NULL. (closes #7084)
This commit is contained in:
@@ -2822,7 +2822,10 @@ compile_dict(char_u **arg, cctx_T *cctx, int literal)
|
||||
|
||||
failret:
|
||||
if (*arg == NULL)
|
||||
{
|
||||
semsg(_(e_missing_dict_end), _("[end of lines]"));
|
||||
*arg = (char_u *)"";
|
||||
}
|
||||
dict_unref(d);
|
||||
return FAIL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user