return -1 for INV_GLYPH_VALUE in GetGlyphInfo

This commit is contained in:
Vincent Wei
2021-05-11 11:18:20 +08:00
parent 754b8f3014
commit a6af326b48

View File

@@ -149,9 +149,12 @@ int GUIAPI GetGlyphInfo (LOGFONT* logfont, Glyph32 glyph_value,
{
/* get the relative device font */
DEVFONT* devfont = SELECT_DEVFONT_BY_GLYPH(logfont, glyph_value);
glyph_value = REAL_GLYPH (glyph_value);
SIZE sz;
if (glyph_value == INV_GLYPH_VALUE)
return -1;
glyph_value = REAL_GLYPH (glyph_value);
/* get metrics of the glyph */
if ((glyph_info->mask & GLYPH_INFO_METRICS) ||
(glyph_info->mask & GLYPH_INFO_BMP)) {