[Swfed-svn] swfed-svn [536] swf_morph_shape_with_style_parse のエラー処理を追加

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 4月 7日 (木) 16:04:47 JST


Revision: 536
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=536
Author:   yoya
Date:     2011-04-07 16:04:47 +0900 (Thu, 07 Apr 2011)

Log Message:
-----------
swf_morph_shape_with_style_parse のエラー処理を追加

Modified Paths:
--------------
    trunk/src/swf_morph_shape_with_style.c
    trunk/src/swf_tag_shape.c


-------------- next part --------------
Modified: trunk/src/swf_morph_shape_with_style.c
===================================================================
--- trunk/src/swf_morph_shape_with_style.c	2011-04-07 05:46:16 UTC (rev 535)
+++ trunk/src/swf_morph_shape_with_style.c	2011-04-07 07:04:47 UTC (rev 536)
@@ -6,13 +6,23 @@
 swf_morph_shape_with_style_parse(bitstream_t *bs,
                                  swf_morph_shape_with_style_t *morph_shape_with_style,
                                  swf_tag_t *tag) {
+    int ret;
     swf_styles_parse(bs, &(morph_shape_with_style->styles), tag);
-    swf_shape_record_parse(bs, &(morph_shape_with_style->shape_records), tag);
+    ret = swf_shape_record_parse(bs, &(morph_shape_with_style->shape_records), tag);
+    if (ret) {
+        fprintf(stderr, "swf_morph_shape_with_style_parse: swf_shape_record_parse shape_records failed\n");
+        return ret;
+    }
+    
     bitstream_align(bs);
     swf_styles_count_parse(bs, &(morph_shape_with_style->styles_count));
-    swf_shape_record_parse(bs, &(morph_shape_with_style->shape_records_morph),
-                           tag);
-    return 0;
+    ret = swf_shape_record_parse(bs, &(morph_shape_with_style->shape_records_morph),
+                                 tag);
+    if (ret) {
+        fprintf(stderr, "swf_morph_shape_with_style_parse: swf_shape_record_parse shape_records_morph failed\n");
+        return ret;
+    }
+    return ret;
 }
 
 int

Modified: trunk/src/swf_tag_shape.c
===================================================================
--- trunk/src/swf_tag_shape.c	2011-04-07 05:46:16 UTC (rev 535)
+++ trunk/src/swf_tag_shape.c	2011-04-07 07:04:47 UTC (rev 536)
@@ -110,7 +110,12 @@
     }
     if (swf_tag_shape->is_morph) {
         swf_tag_shape->offset_morph = bitstream_getbytesLE(bs, 4);
-        swf_morph_shape_with_style_parse(bs, &swf_tag_shape->morph_shape_with_style, tag);
+        ret = swf_morph_shape_with_style_parse(bs, &swf_tag_shape->morph_shape_with_style, tag);
+        if (ret) {
+            fprintf(stderr, "ERROR: swf_tag_shape_input_detail: swf_shape_with_style_parse swf_tag_shape->morph_shape_with_style failed. shape_id=%d\n", swf_tag_shape->shape_id);
+	        bitstream_close(bs);
+            return ret;
+        }
     } else {
         ret = swf_shape_with_style_parse(bs, &swf_tag_shape->shape_with_style, tag);
         if (ret) {



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