|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.574
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.574
|
|
|
3ef2ca |
Problem: No error for eval('$').
|
|
|
3ef2ca |
Solution: Check for empty name. (Yasuhiro Matsumoto)
|
|
|
3ef2ca |
Files: src/eval.c
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.573/src/eval.c 2014-12-13 21:00:52.059036480 +0100
|
|
|
3ef2ca |
--- src/eval.c 2015-01-14 17:11:38.633570761 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 7867,7873 ****
|
|
|
3ef2ca |
if (evaluate)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
if (len == 0)
|
|
|
3ef2ca |
! return FAIL; /* can't be an environment variable */
|
|
|
3ef2ca |
|
|
|
3ef2ca |
cc = name[len];
|
|
|
3ef2ca |
name[len] = NUL;
|
|
|
3ef2ca |
--- 7867,7873 ----
|
|
|
3ef2ca |
if (evaluate)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
if (len == 0)
|
|
|
3ef2ca |
! return FAIL; /* invalid empty name */
|
|
|
3ef2ca |
|
|
|
3ef2ca |
cc = name[len];
|
|
|
3ef2ca |
name[len] = NUL;
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 10117,10130 ****
|
|
|
3ef2ca |
typval_T *argvars;
|
|
|
3ef2ca |
typval_T *rettv;
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
! char_u *s;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
s = get_tv_string_chk(&argvars[0]);
|
|
|
3ef2ca |
if (s != NULL)
|
|
|
3ef2ca |
s = skipwhite(s);
|
|
|
3ef2ca |
|
|
|
3ef2ca |
if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
rettv->v_type = VAR_NUMBER;
|
|
|
3ef2ca |
rettv->vval.v_number = 0;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
--- 10117,10134 ----
|
|
|
3ef2ca |
typval_T *argvars;
|
|
|
3ef2ca |
typval_T *rettv;
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
! char_u *s, *p;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
s = get_tv_string_chk(&argvars[0]);
|
|
|
3ef2ca |
if (s != NULL)
|
|
|
3ef2ca |
s = skipwhite(s);
|
|
|
3ef2ca |
|
|
|
3ef2ca |
+ p = s;
|
|
|
3ef2ca |
if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
+ if (p != NULL && !aborting())
|
|
|
3ef2ca |
+ EMSG2(_(e_invexpr2), p);
|
|
|
3ef2ca |
+ need_clr_eos = FALSE;
|
|
|
3ef2ca |
rettv->v_type = VAR_NUMBER;
|
|
|
3ef2ca |
rettv->vval.v_number = 0;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
*** ../vim-7.4.573/src/version.c 2015-01-14 16:08:29.210474234 +0100
|
|
|
3ef2ca |
--- src/version.c 2015-01-14 17:05:25.357601603 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 743,744 ****
|
|
|
3ef2ca |
--- 743,746 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 574,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
From "know your smileys":
|
|
|
3ef2ca |
:-) Funny
|
|
|
3ef2ca |
|-) Funny Oriental
|
|
|
3ef2ca |
(-: Funny Australian
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|