gdiplus: GdipCreateFontFromLogfontA: no reason to put CHAR to WCHAR array

Nikolay Sivov bunglehead at gmail.com
Mon May 12 16:46:46 CDT 2008


Changelog:
    - GdipCreateFontFromLogfontA: no reason to put CHAR to WCHAR array.

---
 dlls/gdiplus/font.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index a05ef75..eec525f 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -68,7 +68,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc,
     if(!lfa || !font)
         return InvalidParameter;
 
-    memcpy(&lfw, lfa, sizeof(LOGFONTA));
+    memcpy(&lfw, lfa, sizeof(LOGFONTA) - LF_FACESIZE);
 
     if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE))
         return GenericError;
-- 
1.4.4.4






More information about the wine-patches mailing list