0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.1.1217: MS-Windows: no space reserved for font quality name

Problem:    MS-Windows: no space reserved for font quality name.
Solution:   Add quality_name length if present. (Ken Takata, closes #4311)
This commit is contained in:
Bram Moolenaar
2019-04-27 19:15:45 +02:00
parent c1b8160b44
commit 2155a6abaa
2 changed files with 4 additions and 1 deletions

View File

@@ -3127,7 +3127,8 @@ logfont2name(LOGFONTW lf)
quality_name = quality_id2name((int)lf.lfQuality); quality_name = quality_id2name((int)lf.lfQuality);
res = (char *)alloc((unsigned)(strlen(font_name) + 20 res = (char *)alloc((unsigned)(strlen(font_name) + 20
+ (charset_name == NULL ? 0 : strlen(charset_name) + 2))); + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+ (quality_name == NULL ? 0 : strlen(quality_name) + 2)));
if (res != NULL) if (res != NULL)
{ {
p = res; p = res;

View File

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