[WIN32K] Do not try to compare a long name against a truncated name.

This fixes gdiplus_winetest:font crashing.
ROSTESTS-154
This commit is contained in:
Mark Jansen 2018-03-15 19:11:43 +01:00
parent 37a34a21a9
commit 428e4617e9
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -2522,8 +2522,8 @@ GetFontFamilyInfoForList(LPLOGFONTW LogFont,
FontFamilyFillInfo(&InfoEntry, NULL, NULL, FontGDI);
if (_wcsicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName) != 0 &&
_wcsicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfFullName) != 0)
if (_wcsnicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName, RTL_NUMBER_OF(LogFont->lfFaceName)-1) != 0 &&
_wcsnicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfFullName, RTL_NUMBER_OF(LogFont->lfFaceName)-1) != 0)
{
continue;
}