The function WineEngAddFontMemResourceEx in gdi32/fretype.c contained strange XOR operation with some random number 0x87654321, instead of returning the real font handle.<div><br><div><div>From d13e416366549effd77495d490964c4ff23a267b Mon Sep 17 00:00:00 2001</div>
<div>From: Serge Mosin <<a href="mailto:svmosin@gmail.com">svmosin@gmail.com</a>></div><div>Date: Tue, 18 Sep 2012 12:51:33 +0700</div><div>Subject: Removed XOR operation for returning value of</div><div> WineEngAddFontMemResourceEx function</div>
<div><br></div><div>---</div><div> dlls/gdi32/freetype.c |    7 ++-----</div><div> 1 file changed, 2 insertions(+), 5 deletions(-)</div><div><br></div><div>diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c</div><div>
index 8222a18..940e623 100644</div><div>--- a/dlls/gdi32/freetype.c</div><div>+++ b/dlls/gdi32/freetype.c</div><div>@@ -2821,11 +2821,8 @@ HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD</div>
<div>             HeapFree(GetProcessHeap(), 0, pFontCopy);</div><div>             return 0;</div><div>         }</div><div>-        /* FIXME: is the handle only for use in RemoveFontMemResourceEx or should it be a true handle?</div>
<div>-         * For now return something unique but quite random</div><div>-         */</div><div>-        TRACE("Returning handle %lx\n", ((INT_PTR)pFontCopy)^0x87654321);</div><div>-        return (HANDLE)(((INT_PTR)pFontCopy)^0x87654321);</div>
<div>+        TRACE("Returning handle %lx\n", (INT_PTR)pFontCopy);</div><div>+        return (HANDLE)((INT_PTR)pFontCopy);</div><div>     }</div><div> </div><div>     *pcFonts = 0;</div><div>-- </div><div>1.7.9.5</div>
</div></div>