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
}
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) {