mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.0724: closure in compiled function gets same variable in block
Problem: Closure in compiled function gets same variable in block. Solution: At the end of a block to not always reset the variable count. (issue #11094)
This commit is contained in:
@@ -47,7 +47,8 @@ lookup_local(char_u *name, size_t len, lvar_T *lvar, cctx_T *cctx)
|
||||
for (idx = 0; idx < cctx->ctx_locals.ga_len; ++idx)
|
||||
{
|
||||
lvp = ((lvar_T *)cctx->ctx_locals.ga_data) + idx;
|
||||
if (STRNCMP(name, lvp->lv_name, len) == 0
|
||||
if (lvp->lv_name != NULL
|
||||
&& STRNCMP(name, lvp->lv_name, len) == 0
|
||||
&& STRLEN(lvp->lv_name) == len)
|
||||
{
|
||||
if (lvar != NULL)
|
||||
|
Reference in New Issue
Block a user