[Swfed-svn] swfed-svn [382] replaceMovieClip に渡す SWFファイルの input に失敗した場合の処理を追加。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 6日 (日) 23:28:15 JST


Revision: 382
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=382
Author:   yoya
Date:     2011-03-06 23:28:15 +0900 (Sun, 06 Mar 2011)

Log Message:
-----------
replaceMovieClip に渡す SWFファイルの input に失敗した場合の処理を追加。

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


-------------- next part --------------
Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2011-03-06 13:13:52 UTC (rev 381)
+++ trunk/src/swf_object.c	2011-03-06 14:28:15 UTC (rev 382)
@@ -858,7 +858,7 @@
 swf_object_replace_movieclip(swf_object_t *swf,
                              unsigned char *instance_name, int instance_name_len,
                              unsigned char *swf_data, int swf_data_len) {
-    int cid = 0;
+    int cid = 0, ret;
     swf_tag_t *tag, *sprite_tag = NULL, *prev_sprite_tag, *next_sprite_tag;
     if (swf == NULL) {
         fprintf(stderr, "swf_object_replace_movieclip: swf == NULL\n");
@@ -891,7 +891,11 @@
         return 1; // not found instance name;
     }
     swf_object_t *swf4sprite = swf_object_open();
-    swf_object_input(swf4sprite, swf_data, swf_data_len);
+    ret = swf_object_input(swf4sprite, swf_data, swf_data_len);
+    if (ret) {
+        fprintf(stderr, "swf_object_replace_movieclip: swf_object_input failed");
+        return ret;
+    }
 
     // Sprite 中のタグを削除
     for (tag=swf4sprite->tag ; tag ; tag=tag->next) {



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