Author: mjansen
Date: Wed Jul 12 18:40:49 2017
New Revision: 75321
URL:
http://svn.reactos.org/svn/reactos?rev=75321&view=rev
Log:
[WIN32SS] Fix EqualFamilyInfo function logic. Patch by Victor Martinez Calvo, modified by
Katayama Hirofumi MZ.
CORE-13411 #resolve, CID 1411971
Modified:
trunk/reactos/win32ss/gdi/ntgdi/freetype.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Wed Jul 12 18:40:49 2017
@@ -4550,28 +4550,23 @@
}
static BOOL
-EqualFamilyInfo(FONTFAMILYINFO *pInfo1, FONTFAMILYINFO *pInfo2)
-{
- UNICODE_STRING Str1, Str2;
- ENUMLOGFONTEXW *pLog1 = &pInfo1->EnumLogFontEx;
- ENUMLOGFONTEXW *pLog2 = &pInfo2->EnumLogFontEx;
- RtlInitUnicodeString(&Str1, pLog1->elfLogFont.lfFaceName);
- RtlInitUnicodeString(&Str2, pLog2->elfLogFont.lfFaceName);
- if (!RtlEqualUnicodeString(&Str1, &Str2, TRUE))
+EqualFamilyInfo(const FONTFAMILYINFO *pInfo1, const FONTFAMILYINFO *pInfo2)
+{
+ const ENUMLOGFONTEXW *pLog1 = &pInfo1->EnumLogFontEx;
+ const ENUMLOGFONTEXW *pLog2 = &pInfo2->EnumLogFontEx;
+ const LOGFONTW *plf1 = &pLog1->elfLogFont;
+ const LOGFONTW *plf2 = &pLog2->elfLogFont;
+
+ if (_wcsicmp(plf1->lfFaceName, plf2->lfFaceName) != 0)
{
return FALSE;
}
- if ((pLog1->elfStyle != NULL) != (pLog2->elfStyle != NULL))
+
+ if (_wcsicmp(pLog1->elfStyle, pLog2->elfStyle) != 0)
+ {
return FALSE;
- if (pLog1->elfStyle != NULL)
- {
- RtlInitUnicodeString(&Str1, pLog1->elfStyle);
- RtlInitUnicodeString(&Str2, pLog2->elfStyle);
- if (!RtlEqualUnicodeString(&Str1, &Str2, TRUE))
- {
- return FALSE;
- }
- }
+ }
+
return TRUE;
}