Actually skip leading spaces in style name

Because the loop body is just 'break' the loop never loops and at most
one leading space is skipped. Remove the body to allow the loop to
continue. Found with ClangTidy.
This commit is contained in:
Ben Wagner 2021-12-06 16:52:14 -05:00
parent 8d3425b8b8
commit ce00010b1f
1 changed files with 1 additions and 2 deletions

View File

@ -1717,8 +1717,7 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch) if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
goto bail1; goto bail1;
len = strlen ((const char *) style); len = strlen ((const char *) style);
for (i = 0; style[i] != 0 && isspace (style[i]); i++) for (i = 0; style[i] != 0 && isspace (style[i]); i++);
break;
memcpy (style, &style[i], len - i); memcpy (style, &style[i], len - i);
FcStrBufInit (&sbuf, NULL, 0); FcStrBufInit (&sbuf, NULL, 0);
FcStrBufString (&sbuf, family); FcStrBufString (&sbuf, family);