Author: dchapyshev
Date: Mon Apr 13 21:13:35 2009
New Revision: 40486
URL:
http://svn.reactos.org/svn/reactos?rev=40486&view=rev
Log:
- More correct fix of tests
Modified:
trunk/reactos/dll/win32/kernel32/misc/nls.c
trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
Modified: trunk/reactos/dll/win32/kernel32/misc/nls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/nl…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] Mon Apr 13 21:13:35 2009
@@ -1252,6 +1252,7 @@
WINAPI
IsValidCodePage(UINT CodePage)
{
+ if (CodePage == 0) return FALSE;
if (CodePage == CP_UTF8 || CodePage == CP_UTF7)
return TRUE;
if (IntGetLoadedCodePageEntry(CodePage))
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] Mon Apr 13 21:13:35
2009
@@ -2970,22 +2970,16 @@
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
- if (Request->Data.SetConsoleCodePage.CodePage == 0)
- {
- ConioUnlockConsole(Console);
- return STATUS_INVALID_PARAMETER;
- }
- else
- {
- if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
+
+ if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
{
Console->CodePage = Request->Data.SetConsoleCodePage.CodePage;
ConioUnlockConsole(Console);
return STATUS_SUCCESS;
}
- }
+
ConioUnlockConsole(Console);
- return STATUS_UNSUCCESSFUL;
+ return STATUS_INVALID_PARAMETER;
}
CSR_API(CsrGetConsoleOutputCodePage)
@@ -3023,22 +3017,16 @@
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
- if (Request->Data.SetConsoleOutputCodePage.CodePage == 0)
- {
- ConioUnlockConsole(Console);
- return STATUS_INVALID_PARAMETER;
- }
- else
- {
- if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage))
+
+ if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage))
{
Console->OutputCodePage = Request->Data.SetConsoleOutputCodePage.CodePage;
ConioUnlockConsole(Console);
return STATUS_SUCCESS;
}
- }
+
ConioUnlockConsole(Console);
- return STATUS_UNSUCCESSFUL;
+ return STATUS_INVALID_PARAMETER;
}
CSR_API(CsrGetProcessList)