Commit 3d692638 authored by Ben Wagner's avatar Ben Wagner
Browse files

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.
parent 93c93689
Pipeline #239035 passed with stage
in 42 minutes and 40 seconds
......@@ -66,8 +66,7 @@ FcPatternAddFullname (FcPattern *pat)
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
return FcFalse;
len = strlen ((const char *) style);
for (i = 0; style[i] != 0 && isspace (style[i]); i++)
break;
for (i = 0; style[i] != 0 && isspace (style[i]); i++);
memcpy (style, &style[i], len - i);
FcStrBufInit (&sbuf, NULL, 0);
FcStrBufString (&sbuf, family);
......
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