From: Ingo Ruhnke Date: Wed, 13 Aug 2014 21:22:55 +0000 (+0200) Subject: Fixed state table creation issue on loading a savegame X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=ab84ea207eae544cba6f00962d6ebc56892f784f;p=supertux.git Fixed state table creation issue on loading a savegame --- diff --git a/src/supertux/savegame.cpp b/src/supertux/savegame.cpp index 34738c481..16c6a0fb6 100644 --- a/src/supertux/savegame.cpp +++ b/src/supertux/savegame.cpp @@ -195,14 +195,8 @@ Savegame::load() { sq_pushroottable(vm); get_table_entry(vm, "state"); - scripting::load_squirrel_table(vm, -1, *state); - if(SQ_FAILED(sq_createslot(vm, -3))) - { - sq_pop(vm, 1); - throw std::runtime_error("Couldn't create state table"); - } - sq_pop(vm, 1); + sq_pop(vm, 2); } } }