version: Fix error in win 9x mode when a file was not found in GetFileVersionInfoSize.
Nikolay Sivov
bunglehead at gmail.com
Sun Apr 30 03:18:03 CDT 2017
On 28.04.2017 18:03, Sebastian Lackner wrote:
> From: Michael Müller <michael at fds-team.de>
>
> Signed-off-by: Michael Müller <michael at fds-team.de>
> Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
> ---
> dlls/version/version.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/version/version.c b/dlls/version/version.c
> index ed060c82b6..3ab53026e8 100644
> --- a/dlls/version/version.c
> +++ b/dlls/version/version.c
> @@ -705,7 +705,12 @@ DWORD WINAPI GetFileVersionInfoSizeExW( DWORD flags, LPCWSTR filename, LPDWORD h
> return (len * 2) + 4;
>
> default:
> - SetLastError( lzfd == HFILE_ERROR ? ofs.nErrCode : ERROR_RESOURCE_DATA_NOT_FOUND );
> + if (lzfd == HFILE_ERROR)
> + SetLastError(ofs.nErrCode);
> + else if (GetVersion() & 0x80000000)
> + SetLastError(ERROR_FILE_NOT_FOUND);
> + else
> + SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND);
> return 0;
> }
> }
>
What depends on this? Is this function actually exported on Win9x? If
not this fixup should happen in actual affected export I think.
More information about the wine-devel
mailing list