From bb88fada4bd859eb5dbe67dbbc0659b50a95be05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Sun, 27 Mar 2011 22:12:25 +0200 Subject: [PATCH] d3dx9: Use size of variable instead of type. --- dlls/d3dx9_36/effect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index efb5da3668c..15683dfe782 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1137,7 +1137,7 @@ HRESULT WINAPI D3DXCreateEffectFromFileExA(LPDIRECT3DDEVICE9 device, LPCSTR srcf return D3DERR_INVALIDCALL; len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); - srcfileW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR)); + srcfileW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(*srcfileW)); MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len); ret = D3DXCreateEffectFromFileExW(device, srcfileW, defines, include, skipconstants, flags, pool, effect, compilationerrors); @@ -1274,7 +1274,7 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(LPCSTR srcfile, const D3DXMACRO return D3DERR_INVALIDCALL; len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); - srcfileW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR)); + srcfileW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(*srcfileW)); MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len); ret = D3DXCreateEffectCompilerFromFileW(srcfileW, defines, include, flags, effectcompiler, parseerrors);