Commit c46300ff authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

conhost: Use the wcsdup function instead of reimplementing it.

parent ffce2de2
...@@ -692,8 +692,7 @@ static WCHAR *edit_line_history( struct console *console, unsigned int index ) ...@@ -692,8 +692,7 @@ static WCHAR *edit_line_history( struct console *console, unsigned int index )
} }
else if(console->edit_line.current_history) else if(console->edit_line.current_history)
{ {
if ((ptr = malloc( (lstrlenW(console->edit_line.current_history) + 1) * sizeof(WCHAR) ))) ptr = wcsdup( console->edit_line.current_history );
lstrcpyW( ptr, console->edit_line.current_history );
} }
return ptr; return ptr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment