summaryrefslogtreecommitdiff
path: root/src/os_mswin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-10 17:10:51 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-10 17:10:51 +0100
commit38bc49563782ee1cb91660e58acf1afe1a31020a (patch)
tree072db1fda78c0de4086bd718fe9656d864b7d978 /src/os_mswin.c
parentc4d4ac22f78fb1394c79eccc8a1e6812c0c7d8a7 (diff)
downloadvim-git-38bc49563782ee1cb91660e58acf1afe1a31020a.tar.gz
patch 8.0.0072v8.0.0072
Problem: MS-Windows: Crash with long font name. (Henry Hu) Solution: Fix comparing with LF_FACESIZE. (Ken Takata, closes #1243)
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r--src/os_mswin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 625fdccc4..dc5538947 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2893,7 +2893,7 @@ get_logfont(
*/
for (p = name; *p && *p != ':'; p++)
{
- if (p - name + 1 > LF_FACESIZE)
+ if (p - name + 1 >= LF_FACESIZE)
goto theend; /* Name too long */
lf->lfFaceName[p - name] = *p;
}