Nikolay Sivov : gdiplus: GdipCreateFontFromLogfontA: no reason to put CHAR to WCHAR array.

Alexandre Julliard julliard at winehq.org
Tue May 13 04:39:57 CDT 2008


Module: wine
Branch: master
Commit: 4e8ef34676e413a314ddb554834fc606099ca702
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4e8ef34676e413a314ddb554834fc606099ca702

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Tue May 13 01:46:46 2008 +0400

gdiplus: 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..82523ce 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, FIELD_OFFSET(LOGFONTA,lfFaceName) );
 
     if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE))
         return GenericError;




More information about the wine-cvs mailing list