From 8d26cc0baf8f7d05e72bc7b8e5f1a6f7caa9f158 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Sun, 18 Jan 2009 17:20:07 -0800 Subject: [PATCH] only write out extra tags if we're not only writing the header --- lib/rfxswf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rfxswf.c b/lib/rfxswf.c index de39599..93f5db5 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -1591,7 +1591,9 @@ int swf_WriteSWF2(writer_t*writer, SWF * swf) // Writes SWF to file, return t = swf->firstTag; frameCount = 0; - len += WriteExtraTags(swf, 0); + if(swf->firstTag && !no_extra_tags) { + len += WriteExtraTags(swf, 0); + } while(t) { len += swf_WriteTag(-1,t); if(t->id == ST_DEFINESPRITE && !swf_IsFolded(t)) inSprite++; @@ -1673,7 +1675,7 @@ int swf_WriteSWF2(writer_t*writer, SWF * swf) // Writes SWF to file, return return -1; } - if(!no_extra_tags) { + if(swf->firstTag && !no_extra_tags) { WriteExtraTags(swf, writer); } t = swf->firstTag; -- 1.7.10.4