[Swfed-svn] swfed-svn [509] tag replace 処理の不具合を修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 4月 1日 (金) 22:28:38 JST


Revision: 509
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=509
Author:   yoya
Date:     2011-04-01 22:28:38 +0900 (Fri, 01 Apr 2011)

Log Message:
-----------
tag replace 処理の不具合を修正

Modified Paths:
--------------
    trunk/src/swf_object.c


-------------- next part --------------
Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2011-04-01 13:28:16 UTC (rev 508)
+++ trunk/src/swf_object.c	2011-04-01 13:28:38 UTC (rev 509)
@@ -331,7 +331,7 @@
 	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 @@
 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 @@
     if (new_tag->next == NULL) {
         swf->tag_tail = new_tag;
     }
+    old_tag->prev = NULL;
+    old_tag->next = NULL;
     return 0;
 }



Swfed-svn メーリングリストの案内
Back to archive index