From: Matthias Kramm Date: Tue, 13 Oct 2009 03:24:02 +0000 (-0700) Subject: prefix button names with link type for -s linknameurl X-Git-Tag: version-0-9-1~259 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=5ac80872f927e25921a47b3a39eed2cd9edc03d2 prefix button names with link type for -s linknameurl --- diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 48b054a..179c6e2 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -1972,10 +1972,14 @@ static void drawlink(gfxdevice_t*dev, ActionTAG*actions1, ActionTAG*actions2, gf swf_ButtonPostProcess(i->tag, 1); } } + char buf[80]; + char*buf2 = 0; const char* name = 0; if(i->config_linknameurl) { - name = url; + buf2 = malloc(strlen(type)+strlen(url)+2); + sprintf(buf2, "%s:%s", type, url); + name = buf2; } else { name = buf; sprintf(buf, "button%d", buttonid); @@ -1997,6 +2001,9 @@ static void drawlink(gfxdevice_t*dev, ActionTAG*actions1, ActionTAG*actions2, gf } else { swf_ObjectPlace(i->tag, buttonid, getNewDepth(dev),&i->page_matrix,0,(U8*)name); } + + if(buf2) + free(buf2); }