[Swfdec] libswfdec/swfdec_as_context.c

Benjamin Otte company at kemper.freedesktop.org
Wed Oct 10 03:07:32 PDT 2007


 libswfdec/swfdec_as_context.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
diff-tree 0c961bd3f00f8bc768e085f449df7ffb828a8e50 (from 5918f2126c917361bc1bd73e1b659255b42fda47)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Oct 10 12:05:23 2007 +0200

    only assign ints as ints

diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c
index e5660a0..61de9b5 100644
--- a/libswfdec/swfdec_as_context.c
+++ b/libswfdec/swfdec_as_context.c
@@ -1227,7 +1227,11 @@ swfdec_as_context_parseInt (SwfdecAsCont
     return;
   }
 
-  SWFDEC_AS_VALUE_SET_INT (retval, i);
+  if (i > G_MAXINT32 || i < G_MININT32) {
+    SWFDEC_AS_VALUE_SET_NUMBER (retval, i);
+  } else {
+    SWFDEC_AS_VALUE_SET_INT (retval, i);
+  }
 }
 
 SWFDEC_AS_NATIVE (100, 3, swfdec_as_context_parseFloat)


More information about the Swfdec mailing list