else if (strcmp(argv[i], "--help") == 0) showHelp();
else if (strcmp(argv[i], "-record") == 0) {recordMode = REPLAY_MODE::RECORD; strlcpy(replayData.filename, argv[++i], sizeof replayData.filename);}
else if (strcmp(argv[i], "-playback") == 0) {recordMode = REPLAY_MODE::PLAYBACK; strlcpy(replayData.filename, argv[++i], sizeof replayData.filename);}
- else if (strcmp(argv[i], "-map") == 0) {game.setMapName(argv[++i]); requiredSection = SECTION_GAME;}
+ else if (strcmp(argv[i], "-map") == 0) {if (argc > i + 1) {game.setMapName(argv[++i]); requiredSection = SECTION_GAME;}}
else if (strcmp(argv[i], "-listmaps") == 0) listMaps();
else if (strcmp(argv[i], "-credits") == 0) requiredSection = SECTION_CREDITS;