[Swfed-svn] swfed-svn [522] - swf_object_remove_tag で data メンバを消し忘れていて、編集結果が output に反映されないのを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 4月 6日 (水) 14:01:20 JST


Revision: 522
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=522
Author:   yoya
Date:     2011-04-06 14:01:20 +0900 (Wed, 06 Apr 2011)

Log Message:
-----------
- swf_object_remove_tag で data メンバを消し忘れていて、編集結果が output に反映されないのを修正
- 標準エラーにデバッグメッセージが出ているのを削除

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


-------------- next part --------------
Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2011-04-06 02:36:24 UTC (rev 521)
+++ trunk/src/swf_object.c	2011-04-06 05:01:20 UTC (rev 522)
@@ -443,6 +443,10 @@
                 tag_in_sprite = swf_object_search_tag_in_sprite_byseqno(tag_sprite, tag_seqno_in_sprite);
                 if (tag_in_sprite) {
                     ret = _swf_object_remove_tag_in_sprite(tag_sprite, tag_in_sprite);
+                    if (ret == 0) {
+                        free(tag->data);
+                        tag->data = NULL;
+                    }
                 } else {
                     ;
                 }
@@ -481,8 +485,6 @@
 
 static int
 _swf_object_remove_tag_in_sprite(swf_tag_sprite_detail_t *sprite_tag, swf_tag_t *tag) {
-
-    fprintf(stderr, "_swf_object_remove_tag_in_sprite: sprite_id=%d tag->prev=%p tag->next=%p\n", sprite_tag->sprite_id, tag->prev, tag->next);
     if (tag->prev) {
         if (tag->next) { // prev:O next:O
             tag->prev->next = tag->next;
@@ -493,8 +495,8 @@
         }
     } else {
         if (tag->next) { // prev:X next:O
+            sprite_tag->tag = tag->next;
             tag->next->prev = NULL;
-            sprite_tag->tag = tag->next;
             // swf->tag_heat = tag->next;
         } else {         // prev:X next:X
             sprite_tag->tag = NULL;



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