conhost: Use the wcsdup function instead of reimplementing it.
This commit is contained in:
parent
ffce2de26e
commit
c46300ff28
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue