1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-12 16:48:06 -05:00

Cope with XFontStructs having a NULL per_char array, which happened to

me this morning under strange circumstances.

[originally from svn r9303]
This commit is contained in:
Simon Tatham 2011-09-17 14:50:18 +00:00
parent f5b9da6f31
commit 0c4a041f9b

View File

@ -280,6 +280,9 @@ static int x11_font_has_glyph(XFontStruct *xfs, int byte1, int byte2)
(xfs->max_char_or_byte2 - xfs->min_char_or_byte2 + 1)));
}
if (!xfs->per_char) /* per_char NULL => everything in range exists */
return TRUE;
return (xfs->per_char[index].ascent + xfs->per_char[index].descent > 0 ||
xfs->per_char[index].width > 0);
}