Skip to content

Commit bd2ab1e

Browse files
katahiromzlearn-more
authored andcommitted
[FONT][WIN32SS] Ignore identical mapping in IntLoadFontSubstList
1 parent 2ee150c commit bd2ab1e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

win32ss/gdi/ntgdi/freetype.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,15 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
453453
CharSets[FONTSUBST_TO] = (BYTE)_wtoi(pch + 1);
454454
}
455455

456+
/* is it identical? */
457+
if (RtlEqualUnicodeString(&FromW, &ToW, TRUE) &&
458+
CharSets[FONTSUBST_FROM] == CharSets[FONTSUBST_TO])
459+
{
460+
RtlFreeUnicodeString(&FromW);
461+
RtlFreeUnicodeString(&ToW);
462+
continue;
463+
}
464+
456465
/* allocate an entry */
457466
pEntry = ExAllocatePoolWithTag(PagedPool, sizeof(FONTSUBST_ENTRY), TAG_FONT);
458467
if (pEntry == NULL)

0 commit comments

Comments
 (0)