[Swfdec] libswfdec/swfdec_text_format.c
Benjamin Otte
company at kemper.freedesktop.org
Thu Nov 15 00:45:49 PST 2007
libswfdec/swfdec_text_format.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
New commits:
commit 5e5198dffd35c26c7442afbbf6df3503d858935a
Author: Benjamin Otte <otte at gnome.org>
Date: Thu Nov 15 09:50:13 2007 +0100
the special case for version 8 breaks textformat test on PPC
Casting doubles to integers seems to be undefined for out-of-range numbers
diff --git a/libswfdec/swfdec_text_format.c b/libswfdec/swfdec_text_format.c
index 543209b..c884323 100644
--- a/libswfdec/swfdec_text_format.c
+++ b/libswfdec/swfdec_text_format.c
@@ -458,16 +458,7 @@ swfdec_text_format_do_set_color (SwfdecAsContext *cx, SwfdecAsObject *object,
SWFDEC_AS_VALUE_IS_NULL (&argv[0])) {
swfdec_text_format_mark_unset (format, PROP_COLOR);
} else {
- if (cx->version >= 8) {
- double d = swfdec_as_value_to_number (cx, &argv[0]);
- if (!isfinite (d)) {
- format->color = 0;
- } else {
- format->color = (unsigned)d;
- }
- } else {
- format->color = (unsigned)swfdec_as_value_to_integer (cx, &argv[0]);
- }
+ format->color = (unsigned) swfdec_as_value_to_integer (cx, &argv[0]);
swfdec_as_value_to_integer (cx, &argv[0]);
swfdec_as_value_to_string (cx, &argv[0]);
More information about the Swfdec
mailing list