Problem: Crash when method cannot be found. (Christian J. Robinson)
Solution: Don't mix up pointer names.
if (**arg != '(' && alias == NULL
&& (paren = vim_strchr(*arg, '(')) != NULL)
{
+ char_u *deref;
+
*arg = name;
*paren = NUL;
- name = deref_function_name(arg, &tofree, evalarg, verbose);
- if (name == NULL)
+ deref = deref_function_name(arg, &tofree, evalarg, verbose);
+ if (deref == NULL)
{
*arg = name + len;
ret = FAIL;
}
else
+ {
+ name = deref;
len = STRLEN(name);
+ }
*paren = '(';
}
END
CheckScriptSuccess(lines)
+ lines =<< trim END
+ vim9script
+ import './Xsquare.vim'
+
+ echo range(5)->Xsquare.NoSuchFunc()
+ END
+ CheckScriptFailure(lines, 'E1048: Item not found in script: NoSuchFunc')
+
delete('Xsquare.vim')
enddef
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4128,
/**/
4127,
/**/