X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fexample%2Fprotect.c;h=684bc6dac0c3ed2aad97e0f8330018d266733bf0;hb=879d0eec420fe0fd5ddcd56c8fe62b82a6744edd;hp=e6127d126d5f296693a42ce5048994895fe63f4e;hpb=582828b8f1e14254fb5b459555f4beb866ab4d71;p=swftools.git diff --git a/lib/example/protect.c b/lib/example/protect.c index e6127d1..684bc6d 100644 --- a/lib/example/protect.c +++ b/lib/example/protect.c @@ -62,7 +62,7 @@ int main(int argn,char ** argv) if(!ret) printf("Password validation failed\n"); else printf("Password ok\n"); - swf_DeleteTag(tag); + swf_DeleteTag(&swf, tag); } tag = next; } @@ -74,10 +74,8 @@ int main(int argn,char ** argv) if(fi<0) { fprintf(stderr, "couldn't create output file %s", outfilename); } - if(swf.compressed) - {if(swf_WriteSWC(fi, &swf)<0) fprintf(stderr, "WriteSWC() failed.\n");} - else - {if(swf_WriteSWF(fi, &swf)<0) fprintf(stderr, "WriteSWF() failed.\n");} + if(swf_WriteSWF(fi, &swf)<0) + fprintf(stderr, "WriteSWF() failed.\n"); close(fi);