Rob Shearman : d3d8: Fix incorrect ordering of brackets in IDirect3DVertexShader8Impl_GetDevice .
Module: wine Branch: master Commit: 941801c5483b75c68e8c8968d93f0576c23ffcf5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=941801c5483b75c68e8c8968d9... Author: Rob Shearman <robertshearman(a)gmail.com> Date: Tue Sep 30 13:54:45 2008 +0100 d3d8: Fix incorrect ordering of brackets in IDirect3DVertexShader8Impl_GetDevice. The comparison should be (D3D_OK == hr && myDevice), not (D3D_OK == (hr && myDevice)). (Found with PreFast.) --- dlls/d3d8/vertexshader.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/d3d8/vertexshader.c b/dlls/d3d8/vertexshader.c index 89555bd..3af93b4 100644 --- a/dlls/d3d8/vertexshader.c +++ b/dlls/d3d8/vertexshader.c @@ -70,7 +70,8 @@ static HRESULT WINAPI IDirect3DVertexShader8Impl_GetDevice(IDirect3DVertexShader HRESULT hr = D3D_OK; TRACE("(%p) : Relay\n", This); - 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 {
participants (1)
-
Alexandre Julliard