[CONSRV] Fix a corruption of the CONSRV memory when converting read input events back to ANSI.

This fixes a 6-year old copy-paste bug introduced by commit b47d51c6 (r64004).
This commit is contained in:
Hermès Bélusca-Maïto
2020-03-02 00:56:33 +01:00
parent 7babd93107
commit e8df1a38bd

View File

@@ -564,9 +564,10 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo,
/* Now translate everything to ANSI */
if (!GetInputRequest->Unicode)
{
for (; NumEventsRead > 0; --NumEventsRead)
ULONG i;
for (i = 0; i < NumEventsRead; ++i)
{
ConioInputEventToAnsi(InputBuffer->Header.Console, --InputRecord);
ConioInputEventToAnsi(InputBuffer->Header.Console, &InputRecord[i]);
}
}
}