Commit 94080c3d authored by Akira TAGOH's avatar Akira TAGOH

Fix -Wstringop-truncation warning

parent 684c3ce6
......@@ -841,15 +841,14 @@ FcFontSetMatchInternal (FcFontSet **sets,
if (!(p = strchr (s, ',')))
{
f = FcFalse;
len = strlen (s) + 1;
len = strlen (s);
}
else
{
len = (p - s) + 1;
len = (p - s);
}
x = malloc (sizeof (char) * len);
strncpy (x, s, len - 1);
x[len - 1] = 0;
x = malloc (sizeof (char) * (len + 1));
strcpy (x, s);
if (FcObjectFromName (x) > 0)
FcObjectSetAdd (os, x);
s = p + 1;
......
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