Fix whitespace-trimming loop and empty strings...

This commit is contained in:
Behdad Esfahbod 2017-09-27 16:50:30 -04:00
parent a74109a114
commit 554041d596
1 changed files with 3 additions and 3 deletions

View File

@ -1502,10 +1502,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
pp++;
len = strlen ((const char *) pp);
memmove (utf8, pp, len + 1);
pp = utf8 + len - 1;
while (*pp == ' ')
pp = utf8 + len;
while (pp > utf8 && *(pp - 1) == ' ')
pp--;
*(pp + 1) = 0;
*pp = 0;
if (FcStringInPatternElement (pat, elt, utf8))
{