CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/11/30 11:13:32
Modified files:
. : ChangeLog
server/parser : shape_character_def.cpp
Log message:
Don't choke computing bounds of glyph shapes with m_line set to 1.
Fixes bug #21674.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5025&r2=1.5026
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/shape_character_def.cpp?cvsroot=gnash&r1=1.51&r2=1.52
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5025
retrieving revision 1.5026
diff -u -b -r1.5025 -r1.5026
--- ChangeLog 30 Nov 2007 10:04:17 -0000 1.5025
+++ ChangeLog 30 Nov 2007 11:13:32 -0000 1.5026
@@ -1,3 +1,8 @@
+2007-11-30 Sandro Santilli <[EMAIL PROTECTED]>
+
+ * server/parser/shape_character_def.cpp (computeBounds): don't choke
+ on glyph shapes with m_line set to 1. Fixes bug #21674.
+
2007-11-30 Zou Lunkai <[EMAIL PROTECTED]>
* server/vm/ExecutableCode.h: don't push or execute any event code
Index: server/parser/shape_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/shape_character_def.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- server/parser/shape_character_def.cpp 17 Nov 2007 16:21:06 -0000
1.51
+++ server/parser/shape_character_def.cpp 30 Nov 2007 11:13:32 -0000
1.52
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: shape_character_def.cpp,v 1.51 2007/11/17 16:21:06 nihilus Exp $ */
+/* $Id: shape_character_def.cpp,v 1.52 2007/11/30 11:13:32 strk Exp $ */
// Based on the public domain shape.cpp of Thatcher Ulrich <[EMAIL PROTECTED]>
2003
@@ -1084,7 +1084,22 @@
const path& p = m_paths[i];
unsigned thickness = 0;
- if ( p.m_line ) thickness = m_line_styles[p.m_line-1].get_width();
+ if ( p.m_line )
+ {
+ // For glyph shapes m_line is allowed to be 1
+ // while no defined line styles are allowed.
+ if ( m_line_styles.empty() )
+ {
+ // This is either a Glyph, for which m_line==1 is valid
+ // or a bug in the parser, which we have no way to
+ // check at this time
+ assert(p.m_line == 1);
+ }
+ else
+ {
+ thickness = m_line_styles[p.m_line-1].get_width();
+ }
+ }
p.expandBounds(*r, thickness);
}
}
_______________________________________________
Gnash-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-commit