[Swfdec] Branch 'as' - libswfdec/swfdec_as_interpret.c

Benjamin Otte company at kemper.freedesktop.org
Sun Jun 17 05:20:09 PDT 2007


 libswfdec/swfdec_as_interpret.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree 38fbc1389267e593b44041018cbb1750bdcce0fb (from aaca94203d8a0ccb8feb32c0d57df3401fca0350)
Author: Benjamin Otte <otte at gnome.org>
Date:   Sun Jun 17 14:19:45 2007 +0200

    actually convert the values to a string when comparing strings

diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 99ceb2b..9c98b45 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -780,7 +780,8 @@ swfdec_action_new_comparison_7 (SwfdecAs
     swfdec_as_stack_pop (cx->frame->stack);
     SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1));
   } else if (SWFDEC_AS_VALUE_IS_STRING (rval) || SWFDEC_AS_VALUE_IS_STRING (lval)) {
-    int comp = strcmp (SWFDEC_AS_VALUE_GET_STRING (rval), SWFDEC_AS_VALUE_GET_STRING (lval));
+    int comp = strcmp (swfdec_as_value_to_string (cx, rval), 
+	               swfdec_as_value_to_string (cx, lval));
     swfdec_as_stack_pop (cx->frame->stack);
     SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx->frame->stack, 1), action == 0x48 ? comp < 0 : comp > 0);
   } else {


More information about the Swfdec mailing list