17 Mar
2025
17 Mar
'25
8:23 a.m.
eric pouech (@epo) commented about programs/cmd/batch.c:
DWORD charsRead; BOOL status; DWORD i; + DWORD conmode, oldconmode; + CONSOLE_READCONSOLE_CONTROL control; + + GetConsoleMode(h, &oldconmode); I think this would be better handled by rewriting the code as:
`if (GetConsoleMode(h, &oldmode)) {` `/* put all console related code here */` `SetConsoleMode(h, oldmode);` `}` `else` `{` `/* other handles (file, pipe) */` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7586#note_98052