changeset 25616:042b545d588e

No need to reinvent strdup...
author eugeni
date Mon, 07 Jan 2008 21:06:50 +0000
parents ac6b4eb514cf
children 9fa3af97c963
files libass/ass_library.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_library.c	Mon Jan 07 17:23:13 2008 +0000
+++ b/libass/ass_library.c	Mon Jan 07 21:06:50 2008 +0000
@@ -90,8 +90,7 @@
 		return;
 	grow_array((void**)&priv->fontdata, priv->num_fontdata, sizeof(*priv->fontdata));
 	
-	priv->fontdata[idx].name = malloc(strlen(name));
-	strcpy(priv->fontdata[idx].name, name);
+	priv->fontdata[idx].name = strdup(name);
 	
 	priv->fontdata[idx].data = malloc(size);
 	memcpy(priv->fontdata[idx].data, data, size);