X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fserialize.cpp;h=3455d2fc6f4ff81997c35eae1c3f671ea526d053;hb=714a30abd887def6331a193216387e66cbfbd1bb;hp=98341e29c191704a4b3eead064a1771e33806e74;hpb=5254e223656d8a4f9c4c7f681f96f9a92b0b5799;p=supertux.git diff --git a/src/scripting/serialize.cpp b/src/scripting/serialize.cpp index 98341e29c..3455d2fc6 100644 --- a/src/scripting/serialize.cpp +++ b/src/scripting/serialize.cpp @@ -16,6 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#include #include "serialize.hpp" @@ -35,8 +36,8 @@ void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const lisp::Lisp* using namespace lisp; if(table_idx < 0) - table_idx -= 2; - + table_idx -= 2; + lisp::ListIterator iter(lisp); while(iter.next() && iter.lisp() != NULL) { const std::string& token = iter.item(); @@ -79,7 +80,7 @@ void save_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, lisp::Writer& writ // offset because of sq_pushnull if(table_idx < 0) table_idx -= 1; - + //iterator table sq_pushnull(vm); while(SQ_SUCCEEDED(sq_next(vm, table_idx))) { @@ -135,4 +136,3 @@ void save_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, lisp::Writer& writ } } -