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:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user