d3dx9_36: Use SUCCEEDED instead of !FAILED.

Michael Stefaniuc mstefani at redhat.com
Tue Jul 19 08:45:52 CDT 2011


Matteo Bruni wrote:
> 2011/7/19 Michael Stefaniuc <mstefani at redhat.de>:
>> ---
>>  dlls/d3dx9_36/mesh.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
>> index 94a291f..d8f72c4 100644
>> --- a/dlls/d3dx9_36/mesh.c
>> +++ b/dlls/d3dx9_36/mesh.c
>> @@ -3376,7 +3376,7 @@ HRESULT WINAPI D3DXLoadMeshFromXResource(HMODULE module,
>>     if (!resinfo) return D3DXERR_INVALIDDATA;
>>
>>     hr = load_resource_into_memory(module, resinfo, &buffer, &size);
>> -    if (!FAILED(hr)) return D3DXERR_INVALIDDATA;
>> +    if (SUCCEEDED(hr)) return D3DXERR_INVALIDDATA;
>>
>>     return D3DXLoadMeshFromXInMemory(buffer, size, options, device, adjacency,
>>             materials, effect_instances, num_materials, mesh);
>> --
>> 1.7.6
>>
>>
>>
> 
> Isn't that supposed to be "if (FAILED(hr))" ? If I'm not mistaken, now
> it is returning failure when the resource is correctly loaded...
> 
> Thumbs up for Michael's scripts finding real bugs ;)
Shame on me for not noticing that :(
Please submit a fixed patch as I don't want to claim credit for it.

thanks
bye
	michael



More information about the wine-devel mailing list