0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2313: Vim9: using uninitialized field when parsing range

Problem:    Vim9: using uninitialized field when parsing range. ":silent!" not
            respected when parsing range fails.
Solution:   Initialize ea.skip.  On pattern failure handle it like an error.
            (closes #7636)
This commit is contained in:
Bram Moolenaar
2021-01-08 20:40:45 +01:00
parent 467b59c2eb
commit ece0b87c0f
3 changed files with 11 additions and 1 deletions

View File

@@ -3148,11 +3148,13 @@ call_def_function(
goto failed;
++ectx.ec_stack.ga_len;
tv = STACK_TV_BOT(-1);
ea.line2 = 0;
ea.addr_count = 0;
ea.addr_type = ADDR_LINES;
ea.cmd = iptr->isn_arg.string;
ea.skip = FALSE;
if (parse_cmd_address(&ea, &errormsg, FALSE) == FAIL)
goto failed;
goto on_error;
if (ea.addr_count == 0)
tv->vval.v_number = curwin->w_cursor.lnum;
else