Jason Edmeades : cmd.exe:
Redirection for external programs was broken by the conversion to
unicode.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 13 06:31:50 CDT 2007
Module: wine
Branch: master
Commit: 7fce92ea54a60e11c22f1864fadb620e75fc92ec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7fce92ea54a60e11c22f1864fadb620e75fc92ec
Author: Jason Edmeades <jason.edmeades at googlemail.com>
Date: Sun Aug 12 22:29:03 2007 +0100
cmd.exe: Redirection for external programs was broken by the conversion to unicode.
---
programs/cmd/wcmdmain.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 775a553..8318590 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -839,13 +839,13 @@ static void init_msvcrt_io_block(STARTUPINFO* st)
* to change those std handles (this depends on the way wcmd sets
* it's new input & output handles)
*/
- size_t sz = max(sizeof(unsigned) + (sizeof(WCHAR) + sizeof(HANDLE)) * 3, st_p.cbReserved2);
+ size_t sz = max(sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * 3, st_p.cbReserved2);
BYTE* ptr = HeapAlloc(GetProcessHeap(), 0, sz);
if (ptr)
{
unsigned num = *(unsigned*)st_p.lpReserved2;
- WCHAR* flags = (WCHAR*)(ptr + sizeof(unsigned));
- HANDLE* handles = (HANDLE*)(flags + num * sizeof(WCHAR));
+ char* flags = (char*)(ptr + sizeof(unsigned));
+ HANDLE* handles = (HANDLE*)(flags + num * sizeof(char));
memcpy(ptr, st_p.lpReserved2, st_p.cbReserved2);
st->cbReserved2 = sz;
More information about the wine-cvs
mailing list