Commit 85cbe821 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

DD_STRUCT_COPY_BYSIZE: Do not clear more that struct size.

parent 69cf835c
......@@ -45,7 +45,10 @@
do { \
DWORD __size = (to)->dwSize; \
DWORD __copysize = __size; \
memset(to,0,__size); \
DWORD __resetsize = __size; \
if (__resetsize > sizeof(*to)) \
__resetsize = sizeof(*to); \
memset(to,0,__resetsize); \
if ((from)->dwSize < __size) \
__copysize = (from)->dwSize; \
memcpy(to,from,__copysize); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment