mirror of
https://github.com/reactos/reactos.git
synced 2024-09-14 06:42:52 +00:00
- Add check on CodePage = 0. +2 passed wine tests
svn path=/trunk/; revision=40479
This commit is contained in:
parent
709c49c422
commit
9d1684bf68
|
@ -2970,12 +2970,20 @@ CSR_API(CsrSetConsoleCodePage)
|
||||||
|
|
||||||
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
||||||
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
||||||
if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
|
if (Request->Data.SetConsoleCodePage.CodePage == 0)
|
||||||
|
{
|
||||||
|
ConioUnlockConsole(Console);
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
|
||||||
{
|
{
|
||||||
Console->CodePage = Request->Data.SetConsoleCodePage.CodePage;
|
Console->CodePage = Request->Data.SetConsoleCodePage.CodePage;
|
||||||
ConioUnlockConsole(Console);
|
ConioUnlockConsole(Console);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ConioUnlockConsole(Console);
|
ConioUnlockConsole(Console);
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue