From: Matthias Braun Date: Sat, 20 May 2006 20:08:05 +0000 (+0000) Subject: load worldmaps passed on commandline X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7f92c5b8bc9664336901ac56885c426341340375;p=supertux.git load worldmaps passed on commandline SVN-Revision: 3564 --- diff --git a/src/main.cpp b/src/main.cpp index c08222462..94045d612 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -479,8 +479,9 @@ int main(int argc, char** argv) init_rand(); // play_demo sets seed, record_demo uses it if(config->start_level.size() > 4 && - config->start_level.compare(config->start_level.size() - 5, 4, ".stwm") == 0) { - main_loop->push_screen(new WorldMapNS::WorldMap(config->start_level)); + config->start_level.compare(config->start_level.size() - 5, 5, ".stwm") == 0) { + main_loop->push_screen(new WorldMapNS::WorldMap( + FileSystem::basename(config->start_level))); } else { std::auto_ptr session ( new GameSession(FileSystem::basename(config->start_level)));