strndup--!

SVN revision: 62206
This commit is contained in:
Carsten Haitzler 2011-08-08 14:40:33 +00:00
parent 6a2929e448
commit d0429906c2
1 changed files with 3 additions and 3 deletions

View File

@ -715,10 +715,10 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva
end = strchr(start, ',');
if (end)
{
char *tmp;
tmp = strndup(start, end - start);
char *tmp = alloca((end - start) + 1);
strncpy(tmp, start, end - start);
tmp[end - start] = 0;
FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) start);
free(tmp);
}
else
{