mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
eval: Fix SEGV in test49
This commit is contained in:
@@ -2055,6 +2055,7 @@ static char_u *get_lval(char_u *const name, typval_T *const rettv,
|
|||||||
|
|
||||||
lp->ll_exp_name = (char *)make_expanded_name(name, expr_start, expr_end,
|
lp->ll_exp_name = (char *)make_expanded_name(name, expr_start, expr_end,
|
||||||
(char_u *)p);
|
(char_u *)p);
|
||||||
|
lp->ll_name = lp->ll_exp_name;
|
||||||
if (lp->ll_exp_name == NULL) {
|
if (lp->ll_exp_name == NULL) {
|
||||||
/* Report an invalid expression in braces, unless the
|
/* Report an invalid expression in braces, unless the
|
||||||
* expression evaluation has been cancelled due to an
|
* expression evaluation has been cancelled due to an
|
||||||
@@ -2064,9 +2065,10 @@ static char_u *get_lval(char_u *const name, typval_T *const rettv,
|
|||||||
EMSG2(_(e_invarg2), name);
|
EMSG2(_(e_invarg2), name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
lp->ll_name_len = 0;
|
||||||
|
} else {
|
||||||
|
lp->ll_name_len = strlen(lp->ll_name);
|
||||||
}
|
}
|
||||||
lp->ll_name = lp->ll_exp_name;
|
|
||||||
lp->ll_name_len = strlen(lp->ll_name);
|
|
||||||
} else {
|
} else {
|
||||||
lp->ll_name = (const char *)name;
|
lp->ll_name = (const char *)name;
|
||||||
lp->ll_name_len = (size_t)((const char *)p - lp->ll_name);
|
lp->ll_name_len = (size_t)((const char *)p - lp->ll_name);
|
||||||
|
Reference in New Issue
Block a user