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

patch 8.2.0682: Vim9: parsing function argument type can get stuck

Problem:    Vim9: parsing function argument type can get stuck.
Solution:   Bail out when not making progress.
This commit is contained in:
Bram Moolenaar
2020-05-02 19:04:58 +02:00
parent 0b6849e9e3
commit 1c0d44f8ef
3 changed files with 7 additions and 0 deletions

View File

@@ -1663,7 +1663,11 @@ skip_type(char_u *start)
++p;
while (*p != ')' && *p != NUL)
{
char_u *sp = p;
p = skip_type(p);
if (p == sp)
return p; // syntax error
if (*p == ',')
p = skipwhite(p + 1);
}