Commit ced4c383 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

ddraw: Partially revert a struct copy change to fix a regression.

Commit 38713298 caused the regression.
parent ed3a2765
......@@ -585,10 +585,11 @@ typedef struct
#define DD_STRUCT_COPY_BYSIZE_(to,from,from_size) \
do { \
DWORD __size = (to)->dwSize; \
DWORD __copysize = min(__size, from_size); \
DWORD __resetsize = min(__size, sizeof(*to)); \
DWORD __copysize = min(__resetsize, from_size); \
assert(to != from); \
memcpy(to, from, __copysize); \
memset((char*)(to) + __copysize, 0, __size - __copysize); \
memset((char*)(to) + __copysize, 0, __resetsize - __copysize); \
(to)->dwSize = __size; /* restore size */ \
} while (0)
......
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