[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10245: Fix TextRecord parsing in De
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10245: Fix TextRecord parsing in DefineText tags. |
Date: |
Sat, 08 Nov 2008 12:14:43 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10245
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Sat 2008-11-08 12:14:43 +0100
message:
Fix TextRecord parsing in DefineText tags.
modified:
libcore/swf/DefineTextTag.cpp
libcore/swf/TextRecord.cpp
------------------------------------------------------------
revno: 10244.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Sat 2008-11-08 12:02:43 +0100
message:
Inherit values from previous TextRecord when parsing, and make sure
to clear the GlyphEntries.
modified:
libcore/swf/DefineTextTag.cpp
libcore/swf/TextRecord.cpp
=== modified file 'libcore/swf/DefineTextTag.cpp'
--- a/libcore/swf/DefineTextTag.cpp 2008-11-08 10:04:43 +0000
+++ b/libcore/swf/DefineTextTag.cpp 2008-11-08 11:02:43 +0000
@@ -66,10 +66,11 @@
log_parse(_("begin text records for DefineTextTag %p"),
(void*)this);
);
- /// Parse until there are no more records.
+ /// Parse until there are no more records. Each new TextRecord
+ /// uses the values from the previous one unless they are overridden.
+ TextRecord text;
for (;;)
{
- TextRecord text;
if (!text.read(in, m, glyphBits, advanceBits, tag)) break;
_textRecords.push_back(text);
}
=== modified file 'libcore/swf/TextRecord.cpp'
--- a/libcore/swf/TextRecord.cpp 2008-11-08 10:04:43 +0000
+++ b/libcore/swf/TextRecord.cpp 2008-11-08 11:02:43 +0000
@@ -35,6 +35,8 @@
TextRecord::read(SWFStream& in, movie_definition& m, int glyphBits,
int advanceBits, tag_type tag)
{
+ _glyphs.clear();
+
in.ensureBytes(1);
boost::uint8_t flags = in.read_u8();
@@ -55,7 +57,7 @@
if (hasFont)
{
in.ensureBytes(2);
- boost::uint16_t fontID = in.read_u16();
+ boost::uint16_t fontID = in.read_u16();
_font = m.get_font(fontID);
if (!_font)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10245: Fix TextRecord parsing in DefineText tags.,
Benjamin Wolsey <=