From: kramm Date: Thu, 22 May 2008 13:58:08 +0000 (+0000) Subject: terminate font name with \0 X-Git-Tag: buttons-working~196 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=91cad7c2baf4d257bd97bcea1244937c21c083cd terminate font name with \0 --- diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index ee3923e..064b47e 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -942,10 +942,11 @@ int swf_FontSetDefine2(TAG * tag, SWFFONT * f) swf_SetU8(tag, 0); //reserved flags if (f->name) { /* font name */ - swf_SetU8(tag, strlen((const char*)f->name)); - swf_SetBlock(tag, f->name, strlen((const char*)f->name)); + swf_SetU8(tag, strlen((const char*)f->name)+1); + swf_SetBlock(tag, f->name, strlen((const char*)f->name)+1); } else { /* font name (="") */ + swf_SetU8(tag, 1); swf_SetU8(tag, 0); } /* number of glyphs */