Patch 8.2.4128
Problem: Crash when method cannot be found. (Christian J. Robinson)
Solution: Don't mix up pointer names.
Files: src/eval.c, src/testdir/test_vim9_expr.vim
*** ../vim-8.2.4127/src/eval.c 2022-01-17 21:13:24.474867011 +0000
--- src/eval.c 2022-01-18 10:35:03.677677097 +0000
***************
*** 4050,4065 ****
if (**arg != '(' && alias == NULL
&& (paren = vim_strchr(*arg, '(')) != NULL)
{
*arg = name;
*paren = NUL;
! name = deref_function_name(arg, &tofree, evalarg, verbose);
! if (name == NULL)
{
*arg = name + len;
ret = FAIL;
}
else
len = STRLEN(name);
*paren = '(';
}
--- 4050,4070 ----
if (**arg != '(' && alias == NULL
&& (paren = vim_strchr(*arg, '(')) != NULL)
{
+ char_u *deref;
+
*arg = name;
*paren = NUL;
! deref = deref_function_name(arg, &tofree, evalarg, verbose);
! if (deref == NULL)
{
*arg = name + len;
ret = FAIL;
}
else
+ {
+ name = deref;
len = STRLEN(name);
+ }
*paren = '(';
}
*** ../vim-8.2.4127/src/testdir/test_vim9_expr.vim 2022-01-17
20:50:36.491316623 +0000
--- src/testdir/test_vim9_expr.vim 2022-01-18 10:35:46.481600466 +0000
***************
*** 3214,3219 ****
--- 3214,3227 ----
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
*** ../vim-8.2.4127/src/version.c 2022-01-17 22:16:29.862803979 +0000
--- src/version.c 2022-01-18 10:36:59.961471918 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4128,
/**/
--
ARTHUR: I am your king!
WOMAN: Well, I didn't vote for you.
ARTHUR: You don't vote for kings.
WOMAN: Well, 'ow did you become king then?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220118103757.DF6A61C044E%40moolenaar.net.