Fix -Wstringop-truncation warning
This commit is contained in:
parent
684c3ce685
commit
94080c3d48
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue