From 4b5124ce932f843b4d237a0f38850d6dac1208bb Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Mon, 10 May 2010 21:45:36 +0000 Subject: [PATCH] fixing the position of the arguments before --wizard git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4828 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/wizard.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/src/wizard.cpp b/source/src/wizard.cpp index b67987c9..b5b7e70b 100644 --- a/source/src/wizard.cpp +++ b/source/src/wizard.cpp @@ -28,8 +28,11 @@ int wizardmain(int argc, char **argv) return EXIT_FAILURE; } - string outfile(argv[1]); - string relpath(argv[2]); + /* You will never now what server.sh script will really place before --wizard */ + int i = 0; + while (strncmp(argv[i],"--wizard",8)) i++; + string outfile(argv[++i]); + string relpath(argv[++i]); map args;