Alistair Leslie-Hughes <leslie_alist...@hotmail.com> writes:

> diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
> index fa9b050..04914e0 100644
> --- a/dlls/oleaut32/typelib.c
> +++ b/dlls/oleaut32/typelib.c
> @@ -2544,9 +2544,11 @@ static HRESULT TLB_PEFile_Open(LPCWSTR path, INT 
> index, LPVOID *ppBase, DWORD *p
>                      return S_OK;
>                  }
>              }
> -
> -            hr = E_FAIL;
>          }
> +
> +        TRACE("No TYPELIB resource found\n");
> +        hr = E_FAIL;
> +        SetLastError(0);

Setting last error to 0 is almost always wrong. In this case it's most
likely just a side effect of CreateFile, and shouldn't need to be done
explicitly.

-- 
Alexandre Julliard
julli...@winehq.org


Reply via email to