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

Benjamin Otte company at kemper.freedesktop.org
Wed Jun 20 07:39:06 PDT 2007


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

New commits:
diff-tree d2871b604f89627469d6d4e314fad0c77b42fcff (from 28343be13ba26ae3f40c35433a188498ee84d98a)
Author: Andreas Henriksson <andreas at fatal.se>
Date:   Wed Jun 20 16:38:18 2007 +0200

    do StringEquals in a nicer way

diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 306db72..e7a260a 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1002,13 +1002,12 @@ swfdec_action_string_compare (SwfdecAsCo
 
   r = swfdec_as_value_to_string (cx, swfdec_as_stack_pop (cx->frame->stack));
   l = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 1));
-  comp = strcmp (l, r);
   switch (action) {
     case SWFDEC_AS_ACTION_STRING_EQUALS:
-      cond = comp == 0;
+      cond = l == r;
       break;
     case SWFDEC_AS_ACTION_STRING_LESS:
-      cond = comp < 0;
+      cond = strcmp (l, r) < 0;
       break;
     default:
       g_assert_not_reached ();


More information about the Swfdec mailing list