forked from aniani/vim
patch 9.0.1138: crash when expecting varargs but it is something else
Problem: Crash when expecting varargs but it is something else. Solution: Only use the member when the type is a list. (closes #11774)
This commit is contained in:
@@ -932,8 +932,10 @@ check_argument_types(
|
||||
if (varargs && i >= type->tt_argcount - 1)
|
||||
{
|
||||
expected = type->tt_args[type->tt_argcount - 1];
|
||||
if (expected != NULL)
|
||||
if (expected != NULL && expected->tt_type == VAR_LIST)
|
||||
expected = expected->tt_member;
|
||||
if (expected == NULL)
|
||||
expected = &t_any;
|
||||
}
|
||||
else
|
||||
expected = type->tt_args[i];
|
||||
|
Reference in New Issue
Block a user