summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-18 13:42:29 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-18 13:42:29 +0200
commitc6ba2f9dde6d01c8ab356c239c2259f7d83652a4 (patch)
treec1e27d14ae92ba1ffd4f034031f2f18b773d01d5 /src/eval.c
parent47bc9c333766ee3d45cb18c583a630e4ad53405a (diff)
patch 8.2.3175: Vim9: using illegal pointer with nested lambdas.v8.2.3175
Problem: Vim9: using illegal pointer with inline function inside a lambda. Solution: Clear eval_tofree_cmdline when advancing to the next line. (closes #8578)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 5dc1642a16..2e8ab3d8fc 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2177,6 +2177,11 @@ eval_next_line(evalarg_T *evalarg)
vim_free(evalarg->eval_tofree);
evalarg->eval_tofree = line;
}
+
+ // Advanced to the next line, "arg" no longer points into the previous
+ // line.
+ VIM_CLEAR(evalarg->eval_tofree_cmdline);
+
return skipwhite(line);
}