Commit 554041d5 authored by Behdad Esfahbod's avatar Behdad Esfahbod

Fix whitespace-trimming loop and empty strings...

parent a74109a1
...@@ -1502,10 +1502,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, ...@@ -1502,10 +1502,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
pp++; pp++;
len = strlen ((const char *) pp); len = strlen ((const char *) pp);
memmove (utf8, pp, len + 1); memmove (utf8, pp, len + 1);
pp = utf8 + len - 1; pp = utf8 + len;
while (*pp == ' ') while (pp > utf8 && *(pp - 1) == ' ')
pp--; pp--;
*(pp + 1) = 0; *pp = 0;
if (FcStringInPatternElement (pat, elt, utf8)) if (FcStringInPatternElement (pat, elt, utf8))
{ {
......
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