1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

conhost: Use the wcsdup function instead of reimplementing it.

This commit is contained in:
Alex Henrie 2023-09-24 12:05:29 -06:00 committed by Alexandre Julliard
parent ffce2de26e
commit c46300ff28

View file

@ -692,8 +692,7 @@ static WCHAR *edit_line_history( struct console *console, unsigned int index )
}
else if(console->edit_line.current_history)
{
if ((ptr = malloc( (lstrlenW(console->edit_line.current_history) + 1) * sizeof(WCHAR) )))
lstrcpyW( ptr, console->edit_line.current_history );
ptr = wcsdup( console->edit_line.current_history );
}
return ptr;
}