gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/avm2 r9556: Get arguments from the stack i


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9556: Get arguments from the stack in the correct order.
Date: Fri, 12 Sep 2008 01:48:02 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9556
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Fri 2008-09-12 01:48:02 +0800
message:
  Get arguments from the stack in the correct order.
modified:
  libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2008-09-11 15:57:55 +0000
+++ b/libcore/vm/Machine.cpp    2008-09-11 17:48:02 +0000
@@ -2743,8 +2743,9 @@
 std::auto_ptr< std::vector<as_value> > Machine::get_args(unsigned int argc){
        LOG_DEBUG_AVM("There are %u args",argc);
        std::auto_ptr< std::vector<as_value> > args = std::auto_ptr< 
std::vector<as_value> >(new std::vector<as_value>);
-       for(unsigned int i=0;i<argc;i++){
-               args->push_back(pop_stack());
+       args->resize(argc);
+       for(unsigned int i=argc; i>0; --i){
+               args->at(i-1) = pop_stack();
        }
        return args;
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]