From 3e353eba3215b29845053f78ecff3f5e779bd707 Mon Sep 17 00:00:00 2001 From: yoya Date: Fri, 1 Apr 2011 13:28:38 +0000 Subject: [PATCH] =?utf8?q?tag=20replace=20=E5=87=A6=E7=90=86=E3=81=AE?= =?utf8?q?=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/swfed/trunk@509 7c90b180-03d5-4157-b861-58a559ae9d1e --- src/swf_object.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/swf_object.c b/src/swf_object.c index ae63c64..d14b343 100644 --- a/src/swf_object.c +++ b/src/swf_object.c @@ -331,7 +331,7 @@ swf_object_replace_tagdata(swf_object_t *swf, int tag_seqno, if (new_tag) { // 新しいタグに繋ぎかえる swf_object_replace_tag(swf, old_tag, new_tag); - swf_tag_destroy(old_tag); // 前のは消す + swf_tag_destroy(old_tag); // 古いのは消す return 0; } } @@ -1427,6 +1427,8 @@ swf_object_is_bitmap_tagdata(unsigned char *data, int data_len) { int swf_object_replace_tag(swf_object_t *swf, swf_tag_t *old_tag, swf_tag_t *new_tag) { + old_tag->prev->next = new_tag; + old_tag->next->prev = new_tag; new_tag->prev = old_tag->prev; new_tag->next = old_tag->next; if (new_tag->prev == NULL) { @@ -1435,5 +1437,7 @@ swf_object_replace_tag(swf_object_t *swf, if (new_tag->next == NULL) { swf->tag_tail = new_tag; } + old_tag->prev = NULL; + old_tag->next = NULL; return 0; } -- 2.11.0