winex11.drv: If the end of the sequence is '\r\n', there is no need to add extra '\r'.

Signed-off-by: Zhipeng Zhao <zhaozhipeng@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhipeng Zhao 2020-09-20 21:42:09 +08:00 committed by Alexandre Julliard
parent 1e198e17de
commit 05d9df73d1
1 changed files with 1 additions and 1 deletions

View File

@ -673,7 +673,7 @@ static HANDLE unicode_text_from_string( UINT codepage, const void *data, size_t
MultiByteToWideChar( codepage, 0, data, size, strW + count, count );
for (i = j = 0; i < count; i++)
{
if (strW[i + count] == '\n') strW[j++] = '\r';
if (strW[i + count] == '\n' && (!i || strW[i + count - 1] != '\r')) strW[j++] = '\r';
strW[j++] = strW[i + count];
}
strW[j++] = 0;