Thx w3seek that pointout a bug in ConInString it should have been in fristplase GetConsoleCP() instead for GetConsoleOutputCP

svn path=/trunk/; revision=15053
This commit is contained in:
Magnus Olsen 2005-05-06 17:30:45 +00:00
parent 3f0b1b9276
commit 9736e48f66

View file

@ -17,7 +17,6 @@
#define OUTPUT_BUFFER_SIZE 4096 #define OUTPUT_BUFFER_SIZE 4096
VOID ConInDisable (VOID) VOID ConInDisable (VOID)
{ {
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE); HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
@ -105,7 +104,7 @@ VOID ConInString (LPTSTR lpInput, DWORD dwLength)
ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL); ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL);
#ifdef _UNICODE #ifdef _UNICODE
MultiByteToWideChar( GetConsoleOutputCP(), 0, pBuf, dwLength + 1, lpInput, dwLength + 1); MultiByteToWideChar( GetConsoleCP(), 0, pBuf, dwLength + 1, lpInput, dwLength + 1);
#endif #endif
p = lpInput; p = lpInput;
for (i = 0; i < dwRead; i++, p++) for (i = 0; i < dwRead; i++, p++)