http://bugs.winehq.org/show_bug.cgi?id=2796
us@the-edmeades.demon.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |us@the-edmeades.demon.co.uk
------- Additional Comments From us@the-edmeades.demon.co.uk 2005-16-03 11:59 ------- D'oh - Nice bug :-)
The macro is defined as alloc(type,count) and the code passes in WCHAR and nLen+1. This becomes HeapAlloc for count*sizeof(type) which becomes nLen+1*sizeof(WCHAR) - ie nlen + sizeof(WCHAR). Adding brackets to the macro avoids the problem.
Patch submitted to wine-patches : http://www.winehq.org/hypermail/wine- patches/2005/03/0336.html