[Swfdec] libswfdec/swfdec_font.c
Benjamin Otte
company at kemper.freedesktop.org
Sat Apr 28 05:40:25 PDT 2007
libswfdec/swfdec_font.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
New commits:
diff-tree e58f25683ddec3dd4e613d7a7b4d5ab58a27561c (from 95e6fcf07596addaa0605cc3f66e7551de57a971)
Author: Benjamin Otte <otte at gnome.org>
Date: Sat Apr 28 14:41:04 2007 +0200
Fix regression in font parsing code that made DefineFont not work
Someone knows a simple way to create testfiles for this? :(
diff --git a/libswfdec/swfdec_font.c b/libswfdec/swfdec_font.c
index 8b6d5f3..b3616dc 100644
--- a/libswfdec/swfdec_font.c
+++ b/libswfdec/swfdec_font.c
@@ -188,13 +188,14 @@ swfdec_font_parse_shape (SwfdecSwfDecode
g_ptr_array_add (shape->fills, swfdec_pattern_new_color (0xFFFFFFFF));
g_ptr_array_add (shape->lines, swfdec_stroke_new (20, 0xFFFFFFFF));
+ swfdec_bits_init_bits (&s->b, &save_bits, size);
+
shape->n_fill_bits = swfdec_bits_getbits (&s->b, 4);
SWFDEC_LOG ("n_fill_bits = %d", shape->n_fill_bits);
shape->n_line_bits = swfdec_bits_getbits (&s->b, 4);
SWFDEC_LOG ("n_line_bits = %d", shape->n_line_bits);
-
- swfdec_bits_init_bits (&s->b, &save_bits, size);
swfdec_shape_get_recs (s, shape, swfdec_pattern_parse, swfdec_stroke_parse);
+
swfdec_bits_syncbits (&s->b);
if (swfdec_bits_left (&s->b)) {
SWFDEC_WARNING ("parsing shape didn't use %d bytes",
More information about the Swfdec
mailing list