0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.1481: length for two-digit rgb termresponse is off by one

Problem:    Length for two-digit rgb termresponse is off by one.
Solution:   Adjust the length. (closes #4494)
This commit is contained in:
Bram Moolenaar 2019-06-06 15:19:31 +02:00
parent 8e228e21cc
commit 12e71eb8a8
2 changed files with 3 additions and 1 deletions

View File

@ -4990,7 +4990,7 @@ check_termcode(
int is_4digit = i - j >= 21 && tp[j + 11] == '/'
&& tp[j + 16] == '/';
if (i - j >= 14 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
if (i - j >= 15 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
&& (is_4digit
|| (tp[j + 9] == '/' && tp[i + 12 == '/'])))
{

View File

@ -767,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1481,
/**/
1480,
/**/