svnno****@sourc*****
svnno****@sourc*****
2011年 4月 6日 (水) 15:48:42 JST
Revision: 523 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=523 Author: yoya Date: 2011-04-06 15:48:42 +0900 (Wed, 06 Apr 2011) Log Message: ----------- DefineShape2 以上のタグで FillStyleCount が 255 未満でも、ExtendedCount フォーマットでバイナリを構築していたので修正。(これが悪さして Flash Player が表示を諦め得る事がある) Modified Paths: -------------- trunk/src/swf_fill_style_array.c trunk/src/swf_line_style_array.c -------------- next part -------------- Modified: trunk/src/swf_fill_style_array.c =================================================================== --- trunk/src/swf_fill_style_array.c 2011-04-06 05:01:20 UTC (rev 522) +++ trunk/src/swf_fill_style_array.c 2011-04-06 06:48:42 UTC (rev 523) @@ -42,7 +42,9 @@ swf_tag_t *tag) { int i; int ret; - if ((tag->tag == 2) && (fill_style_array->count < 255)) { // DefineShape + if ((tag->tag == 2) || // DefineShape + ((tag->tag > 2) && (fill_style_array->count < 255))) { + // tag->tag == 2 の時は count == 255 でもここに来るように bitstream_putbyte(bs, fill_style_array->count); } else { bitstream_putbyte(bs, 255); Modified: trunk/src/swf_line_style_array.c =================================================================== --- trunk/src/swf_line_style_array.c 2011-04-06 05:01:20 UTC (rev 522) +++ trunk/src/swf_line_style_array.c 2011-04-06 06:48:42 UTC (rev 523) @@ -46,12 +46,13 @@ int swf_line_style_array_build(bitstream_t *bs, swf_line_style_array_t *line_style_array, swf_tag_t *tag) { int i; - if ((tag->tag != 2) || // ! DefineShape - (255 <= line_style_array->count)) { + if ((tag->tag == 2) || // DefineShape + ((tag->tag > 2) && (line_style_array->count < 255))) { + // tag->tag == 2 の時は count == 255 でもここに来るように + bitstream_putbyte(bs, line_style_array->count); + } else { bitstream_putbyte(bs, 255); bitstream_putbytesLE(bs, line_style_array->count, 2); - } else { - bitstream_putbyte(bs, line_style_array->count); } for (i = 0 ; i < line_style_array->count ; i++) { swf_line_style_build(bs, &(line_style_array->line_style[i]), tag);