timknip / pyswf

A Python library to read and write SWF files
https://github.com/timknip/pyswf/wiki
MIT License
157 stars 65 forks source link

TagDefineEditText is not read correctly #33

Open 0xE1 opened 8 years ago

0xE1 commented 8 years ago

"data.reset_bits_pending()" is required after "self.bounds = data.readRECT()", otherwise there's 1 byte shift. fontHeight have to be read with hasFont or hasFontClass flag. Currently only hasFont is checked. Otherwise there's 2 bytes shift after that.

Ref1: http://sourceforge.net/adobe/swfinvestigator/code/17/tree/trunk/SWFInvestigator/src/decompiler/swfdump/TagDecoder.as#l1191 Ref2: http://sourceforge.net/adobe/swfinvestigator/code/17/tree/trunk/SWFInvestigator/src/decompiler/swfdump/TagDecoder.as#l1162 Example: http://pastebin.com/jyjd1FrB