Skip to content

Commit

Permalink
fix shape parsing after styles change
Browse files Browse the repository at this point in the history
  • Loading branch information
lieff committed Sep 21, 2017
1 parent d0f5585 commit 3dad39d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/modules/swfshape.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,11 @@ static SHAPELINE* swf_ParseShapeData(U8*data, int bits, int fillbits, int linebi
y = swf_GetSBits(tag, n); //y
}
if(flags&2)
fill0 = swf_GetBits(tag, fillbits) + fillstyleadd;
fill0 = swf_GetBits(tag, fillbits);
if(flags&4)
fill1 = swf_GetBits(tag, fillbits) + fillstyleadd;
fill1 = swf_GetBits(tag, fillbits);
if(flags&8)
line = swf_GetBits(tag, linebits) + linestyleadd;
line = swf_GetBits(tag, linebits);
if(flags&16) {
if(!shape2) {
fprintf(stderr, "rfxswf: Error: Additional fillstyles not supported\n");fflush(stderr);
Expand All @@ -699,6 +699,12 @@ static SHAPELINE* swf_ParseShapeData(U8*data, int bits, int fillbits, int linebi
fillbits = swf_GetBits(tag, 4);
linebits = swf_GetBits(tag, 4);
}
if((flags&2) && fill0)
fill0 += fillstyleadd;
if((flags&4) && fill1)
fill1 += fillstyleadd;
if((flags&8) && line)
line += linestyleadd;
if(flags&1) { //move
lines->next = (SHAPELINE*)rfx_alloc(sizeof(SHAPELINE));
lines = lines->next;
Expand Down

0 comments on commit 3dad39d

Please sign in to comment.