dwrite: Protect from space-only strings when trimming away spaces.
This commit is contained in:
parent
6b98b9ac70
commit
1f54400bbf
|
@ -1967,7 +1967,10 @@ static int trim_spaces(WCHAR *in, WCHAR *ret)
|
|||
while (isspaceW(*in))
|
||||
in++;
|
||||
|
||||
len = strlenW(in);
|
||||
ret[0] = 0;
|
||||
if (!(len = strlenW(in)))
|
||||
return 0;
|
||||
|
||||
while (isspaceW(in[len-1]))
|
||||
len--;
|
||||
|
||||
|
|
Loading…
Reference in New Issue