On Wed, Jan 21, 2015 at 1:37 AM, Alistair Leslie-Hughes leslie_alistair@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