[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
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

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]);
}
}
}