more secure... i am sure that wizardmain cannot be called without --wizard, but who knows the mods people will do in the future...

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4829 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-05-10 21:50:38 +00:00
parent 4b5124ce93
commit bced620da3
+4 -2
View File
@@ -29,8 +29,10 @@ int wizardmain(int argc, char **argv)
}
/* You will never now what server.sh script will really place before --wizard */
int i = 0;
while (strncmp(argv[i],"--wizard",8)) i++;
int k, i = 0;
while ( ( k = strncmp(argv[i],"--wizard",8) ) != 0 && i < 20 ) i++;
if ( k != 0 ) return EXIT_FAILURE;
string outfile(argv[++i]);
string relpath(argv[++i]);