patch 9.0.2173: Vim9: crash when compiling for statement and non-existing type
Problem: Vim9: Vim crashes when compiling a for statement with a
non-existing type
Solution: Error out when lhs_type is not null
closes: #13703
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a185a31fc0
commit
062bb6b909
@ -1088,6 +1088,8 @@ compile_for(char_u *arg_start, cctx_T *cctx)
|
||||
}
|
||||
p = skipwhite(p + 1);
|
||||
lhs_type = parse_type(&p, cctx->ctx_type_list, TRUE);
|
||||
if (lhs_type == NULL)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (get_var_dest(name, &dest, CMD_for, &opt_flags,
|
||||
|
||||
Reference in New Issue
Block a user