[PATCH 6/6] kernel32: Invalid console handles for new processes are 0, not INVALID_HANDLE_VALUE.
Erich E. Hoover
erich.e.hoover at wine-staging.com
Wed Jan 21 09:22:44 CST 2015
On Wed, Jan 21, 2015 at 1:37 AM, Alistair Leslie-Hughes
<leslie_alistair at hotmail.com> wrote:
> On 21/01/15 08:51, Erich E. Hoover wrote:
>>
>> Several applications rely on the TEB value for fresh invalid console
>> handles to be zero instead of INVALID_HANDLE_VALUE (fixes Bug #36216
>> and Bug #37914).
>>
>>
>> +····if·(!params->hStdOutput·||·params->hStdOutput·==·INVALID_HANDLE_VALUE)
>> +········params->hStdOutput·=·0;
>
>
> The !params->hStdOutput check is redundant since it's already 0. Applies to
> the other places as well.
You need to provide some sort of no-op, otherwise it will try to map
the handle in the next part of that if block:
else if (VerifyConsoleIoHandle(console_handle_map(params->hStdOutput)))
params->hStdOutput = console_handle_map(params->hStdOutput);
Best,
Erich
More information about the wine-devel
mailing list