src/fcopentype.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 3d6926380dc3c8597dc2fd9d34087da9b39dfdd9 Author: Ben Wagner <bungeman@xxxxxxxxxxxx> Date: Fri Dec 4 15:00:08 2020 -0500 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. diff --git a/src/fcopentype.c b/src/fcopentype.c index 59cce45..39c05e9 100644 --- a/src/fcopentype.c +++ b/src/fcopentype.c @@ -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); _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig