diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 118b7444e42..5293c7e4461 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -453,6 +453,15 @@ IntLoadFontSubstList(PLIST_ENTRY pHead) CharSets[FONTSUBST_TO] = (BYTE)_wtoi(pch + 1); } + /* is it identical? */ + if (RtlEqualUnicodeString(&FromW, &ToW, TRUE) && + CharSets[FONTSUBST_FROM] == CharSets[FONTSUBST_TO]) + { + RtlFreeUnicodeString(&FromW); + RtlFreeUnicodeString(&ToW); + continue; + } + /* allocate an entry */ pEntry = ExAllocatePoolWithTag(PagedPool, sizeof(FONTSUBST_ENTRY), TAG_FONT); if (pEntry == NULL)