mirror of
https://github.com/reactos/reactos.git
synced 2025-07-16 00:14:04 +00:00
- Add more check on CodePage = 0. +2 passed wine tests
svn path=/trunk/; revision=40480
This commit is contained in:
parent
9d1684bf68
commit
d74a83ca5a
1 changed files with 9 additions and 1 deletions
|
@ -3023,12 +3023,20 @@ CSR_API(CsrSetConsoleOutputCodePage)
|
||||||
|
|
||||||
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 (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;
|
Console->OutputCodePage = Request->Data.SetConsoleOutputCodePage.CodePage;
|
||||||
ConioUnlockConsole(Console);
|
ConioUnlockConsole(Console);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ConioUnlockConsole(Console);
|
ConioUnlockConsole(Console);
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue