Copy the correct number of bytes in WriteConsoleInputA.

This commit is contained in:
Marcus Meissner 2001-12-04 19:40:54 +00:00 committed by Alexandre Julliard
parent d585e7a2a4
commit d848e5f3dd
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ BOOL WINAPI WriteConsoleInputA( HANDLE handle, const INPUT_RECORD *buffer,
BOOL ret;
if (!(recW = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*recW) ))) return FALSE;
memcpy( recW, buffer, count );
memcpy( recW, buffer, count*sizeof(*recW) );
input_records_AtoW( recW, count );
ret = WriteConsoleInputW( handle, recW, count, written );
HeapFree( GetProcessHeap(), 0, recW );