Mercurial > vim
comparison src/gui_w32.c @ 16425:e263ace0c9d0 v8.1.1217
patch 8.1.1217: MS-Windows: no space reserved for font quality name
commit https://github.com/vim/vim/commit/2155a6abaa5d065ad7b580229321860591126f2e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 27 19:15:45 2019 +0200
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 https://github.com/vim/vim/issues/4311)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 27 Apr 2019 19:30:04 +0200 |
parents | 973070a30381 |
children | 9d20e26dc13c |
comparison
equal
deleted
inserted
replaced
16424:92d7723ec523 | 16425:e263ace0c9d0 |
---|---|
3125 return NULL; | 3125 return NULL; |
3126 charset_name = charset_id2name((int)lf.lfCharSet); | 3126 charset_name = charset_id2name((int)lf.lfCharSet); |
3127 quality_name = quality_id2name((int)lf.lfQuality); | 3127 quality_name = quality_id2name((int)lf.lfQuality); |
3128 | 3128 |
3129 res = (char *)alloc((unsigned)(strlen(font_name) + 20 | 3129 res = (char *)alloc((unsigned)(strlen(font_name) + 20 |
3130 + (charset_name == NULL ? 0 : strlen(charset_name) + 2))); | 3130 + (charset_name == NULL ? 0 : strlen(charset_name) + 2) |
3131 + (quality_name == NULL ? 0 : strlen(quality_name) + 2))); | |
3131 if (res != NULL) | 3132 if (res != NULL) |
3132 { | 3133 { |
3133 p = res; | 3134 p = res; |
3134 /* make a normal font string out of the lf thing:*/ | 3135 /* make a normal font string out of the lf thing:*/ |
3135 sprintf((char *)p, "%s:h%d", font_name, pixels_to_points( | 3136 sprintf((char *)p, "%s:h%d", font_name, pixels_to_points( |