Commit 68bbf6fb authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Remove all trailing nulls when exporting text strings.

parent 0bdebc66
...@@ -1130,7 +1130,7 @@ static char *string_from_unicode_text( UINT codepage, HANDLE handle, UINT *size ...@@ -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; if (str[i] == '\r' && (i == len - 1 || str[i + 1] == '\n')) continue;
str[j++] = str[i]; str[j++] = str[i];
} }
if (j && !str[j - 1]) j--; /* remove trailing null */ while (j && !str[j - 1]) j--; /* remove trailing nulls */
*size = j; *size = j;
TRACE( "returning %s\n", debugstr_an( str, j )); TRACE( "returning %s\n", debugstr_an( str, j ));
} }
......
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