Module: wine Branch: master Commit: a4b2a2c3808854bfe7fc3cf6ba14bbe4cac356f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a4b2a2c3808854bfe7fc3cf6ba...
Author: Rob Shearman robertshearman@gmail.com Date: Tue Sep 30 13:54:50 2008 +0100
d3d9: Fix incorrect ordering of brackets in IDirect3DVertexShader9Impl_GetDevice.
The comparison should be (D3D_OK == hr && myDevice), not (D3D_OK == (hr && myDevice)). (Found with PreFast.)
---
dlls/d3d9/vertexshader.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d9/vertexshader.c b/dlls/d3d9/vertexshader.c index c41b2c4..d40d0a5 100644 --- a/dlls/d3d9/vertexshader.c +++ b/dlls/d3d9/vertexshader.c @@ -73,7 +73,8 @@ static HRESULT WINAPI IDirect3DVertexShader9Impl_GetDevice(LPDIRECT3DVERTEXSHADE TRACE("(%p) : Relay\n", This);
EnterCriticalSection(&d3d9_cs); - if (D3D_OK == (hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice) && myDevice != NULL)) { + hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice); + if (D3D_OK == hr && myDevice != NULL) { hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); IWineD3DDevice_Release(myDevice); } else {