imm32: Assign to structs instead of using memcpy (Try 2)

Andrew Talbot andrew.talbot at talbotville.com
Fri Feb 29 05:07:14 CST 2008


This version includes another incident.

-- Andy.
---
Changelog:
    imm32: Assign to structs instead of using memcpy.

diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index 436c126..4ce857d 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -1014,7 +1014,7 @@ BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
     if (!data)
         return FALSE;
 
-    memcpy(lpCompForm,&(data->IMC.cfCompForm),sizeof(COMPOSITIONFORM));
+    *lpCompForm = data->IMC.cfCompForm;
     return 1;
 }
 
@@ -1614,7 +1614,7 @@ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf)
     if (!data)
         return FALSE;
 
-    memcpy(&data->IMC.lfFont.W,lplf,sizeof(LOGFONTW));
+    data->IMC.lfFont.W = *lplf;
     ImmInternalSendIMENotify(IMN_SETCOMPOSITIONFONT, 0);
 
     if (data->textfont)
@@ -1751,7 +1751,7 @@ BOOL WINAPI ImmSetCompositionWindow(
     if (!data)
         return FALSE;
 
-    memcpy(&data->IMC.cfCompForm,lpCompForm,sizeof(COMPOSITIONFORM));
+    data->IMC.cfCompForm = *lpCompForm;
 
     if (IsWindowVisible(hwndDefault))
     {



More information about the wine-patches mailing list