Module: wine Branch: master Commit: 372984e053b0fc8a8e56d5f2209540b61fb2836b URL: http://source.winehq.org/git/wine.git/?a=commit;h=372984e053b0fc8a8e56d5f220...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri May 25 16:10:29 2012 +0200
d3dx9: Don't use HEAP_ZERO_MEMORY if we're going to overwrite the memory anyway.
---
dlls/d3dx9_36/surface.c | 4 ++-- dlls/d3dx9_36/texture.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 821d51e..d490cef 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -656,7 +656,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info) if( !file ) return D3DERR_INVALIDCALL;
strlength = MultiByteToWideChar(CP_ACP, 0, file, -1, NULL, 0); - widename = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlength * sizeof(WCHAR)); + widename = HeapAlloc(GetProcessHeap(), 0, strlength * sizeof(*widename)); MultiByteToWideChar(CP_ACP, 0, file, -1, widename, strlength);
hr = D3DXGetImageInfoFromFileW(widename, info); @@ -918,7 +918,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileA(LPDIRECT3DSURFACE9 pDestSurface, if( !pSrcFile || !pDestSurface ) return D3DERR_INVALIDCALL;
strlength = MultiByteToWideChar(CP_ACP, 0, pSrcFile, -1, NULL, 0); - pWidename = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlength * sizeof(WCHAR)); + pWidename = HeapAlloc(GetProcessHeap(), 0, strlength * sizeof(*pWidename)); MultiByteToWideChar(CP_ACP, 0, pSrcFile, -1, pWidename, strlength);
hr = D3DXLoadSurfaceFromFileW(pDestSurface, pDestPalette, pDestRect, pWidename, pSrcRect, dwFilter, Colorkey, pSrcInfo); diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 750025c..c17a327 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -746,7 +746,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileExA(LPDIRECT3DDEVICE9 device, return D3DERR_INVALIDCALL;
len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); - widename = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR)); + widename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*widename)); MultiByteToWideChar(CP_ACP, 0, srcfile, -1, widename, len);
hr = D3DXCreateTextureFromFileExW(device, widename, width, height, miplevels,