windowscodecs: Fix *_CopyPixels functions to properly handle a NULL rectangle

Krzysztof Nowicki krissn at
Mon Oct 18 13:51:49 CDT 2010

W dniu 17.10.2010 18:49, Vitaliy Margolen pisze:
> On 10/17/2010 01:59 AM, Krzysztof Nowicki wrote:
>> Doing a memcpy to a local rectangle seems a morenatural way to do it
> Not really. Doing RECT = RECT is the natural way to do it. Don't use
> memcpy to copy one structure to another structure of the same type.
> Vitaliy.

Where I come from copying structures directly is considered bad practice 
and it's safer to use memcpy. We had problems before with broken 
compilers that would try to do some black magic in such cases. So the 
policy was to use memcpy for structures because it's safer. A good 
compiler will inline such a memcpy anyway.

If the policy for Wine is to copy structures directly then I'll respect it.


More information about the wine-devel mailing list