Skip to content

Commit

Permalink
Fixed #2581
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Sep 1, 2023
1 parent 3ec93d7 commit e396648
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions src/scene_manager/swf_parse.c
Expand Up @@ -182,37 +182,17 @@ static void swf_get_rec(SWFReader *read, SWFRec *rc)

static u32 swf_get_32(SWFReader *read)
{
u32 val, res;
val = swf_read_int(read, 32);
res = (val&0xFF);
res <<=8;
res |= ((val>>8)&0xFF);
res<<=8;
res |= ((val>>16)&0xFF);
res<<=8;
res|= ((val>>24)&0xFF);
return res;
return gf_bs_read_u32_le(read->bs);
}

static u16 swf_get_16(SWFReader *read)
{
u16 val, res;
val = swf_read_int(read, 16);
res = (val&0xFF);
res <<=8;
res |= ((val>>8)&0xFF);
return res;
return gf_bs_read_u16_le(read->bs);
}

static s16 swf_get_s16(SWFReader *read)
{
s16 val;
u8 v1;
v1 = swf_read_int(read, 8);
val = swf_read_sint(read, 8);
val = (val<<8)&0xFF00;
val |= (v1&0xFF);
return val;
return (s16) gf_bs_read_u16_le(read->bs);
}

static u32 swf_get_color(SWFReader *read)
Expand Down

0 comments on commit e396648

Please sign in to comment.