mirror of
https://github.com/reactos/wine.git
synced 2025-02-26 15:57:20 +00:00
winex11: Remove all trailing nulls when exporting text strings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0bdebc66c6
commit
68bbf6fb18
@ -1130,7 +1130,7 @@ static char *string_from_unicode_text( UINT codepage, HANDLE handle, UINT *size
|
||||
if (str[i] == '\r' && (i == len - 1 || str[i + 1] == '\n')) continue;
|
||||
str[j++] = str[i];
|
||||
}
|
||||
if (j && !str[j - 1]) j--; /* remove trailing null */
|
||||
while (j && !str[j - 1]) j--; /* remove trailing nulls */
|
||||
*size = j;
|
||||
TRACE( "returning %s\n", debugstr_an( str, j ));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user