https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd2ab1e9bc88e1ee257fb51ef358c10881cdfc44

commit bd2ab1e9bc88e1ee257fb51ef358c10881cdfc44
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Fri Aug 17 10:46:01 2018 +0900
Commit:     Mark Jansen <[email protected]>
CommitDate: Fri Aug 17 16:05:04 2018 +0200

    [FONT][WIN32SS] Ignore identical mapping in IntLoadFontSubstList
---
 win32ss/gdi/ntgdi/freetype.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index 118b7444e4..5293c7e446 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)

Reply via email to