IntReadConsole: in case of unicode read, not all chars were copied

W2k cmd.exe now works for me

svn path=/trunk/; revision=12171
This commit is contained in:
Gunnar Dalsnes
2004-12-18 00:28:16 +00:00
parent 69c462a21c
commit 68b0228983
+2 -2
View File
@@ -1,4 +1,4 @@
/* $Id: console.c,v 1.84 2004/12/17 00:44:46 gdalsnes Exp $
/* $Id: console.c,v 1.85 2004/12/18 00:28:16 gdalsnes Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -1271,7 +1271,7 @@ IntReadConsole(HANDLE hConsoleInput,
nNumberOfCharsToRead -= Reply->Data.ReadConsoleReply.NrCharactersRead;
memcpy((PVOID)((ULONG_PTR)lpBuffer + (ULONG_PTR)(CharsRead * CharSize)),
Reply->Data.ReadConsoleReply.Buffer,
Reply->Data.ReadConsoleReply.NrCharactersRead);
Reply->Data.ReadConsoleReply.NrCharactersRead * CharSize);
CharsRead += Reply->Data.ReadConsoleReply.NrCharactersRead;
if(Reply->Status == STATUS_NOTIFY_CLEANUP)