Skip leading whitespace in style name.
Found by Clang-Tidy. The intent seems to have been to skip all leading whitespace in the 'style' string, but instead this loop was an odd looking no-op. Remove the 'break' from the loop so that it will continue until end of string or a non-space character is found.
This commit is contained in:
parent
93c93689f5
commit
3d6926380d
|
@ -66,8 +66,7 @@ FcPatternAddFullname (FcPattern *pat)
|
||||||
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
|
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue