Fix incorrect size in memmove call in FcObjectSetAdd that crashed

FcFontSetList calls
This commit is contained in:
Keith Packard 2002-06-18 16:47:12 +00:00
parent c0d42979ad
commit 5b1bfa5d82
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ FcObjectSetAdd (FcObjectSet *os, const char *object)
}
if (c < 0)
mid++;
memmove (os->objects + mid + 1, os->objects + mid, os->nobject - mid);
memmove (os->objects + mid + 1, os->objects + mid,
(os->nobject - mid) * sizeof (const char *));
os->objects[mid] = object;
os->nobject++;
return FcTrue;