else if ( !strcmp( argv[ i ], "-bspfile" ) )
{
strcpy( BSPFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as bsp file\n", BSPFilePath );
}
else if ( !strcmp( argv[ i ], "-linfile" ) )
{
strcpy( lineFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as line file\n", lineFilePath );
}
else if ( !strcmp( argv[ i ], "-prtfile" ) )
{
strcpy( portalFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as portal file\n", portalFilePath );
}
else if ( !strcmp( argv[ i ], "-srffile" ) )
{
strcpy( surfaceFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as surface file\n", surfaceFilePath );
}
else{
for ( i = beginArgs; i < endArgs; ++i )
{
+ if ( argv[i] == NULL ) {
+ continue;
+ }
if ( outpos != sentinel && i != beginArgs ) {
*outpos++ = ' ';
}
else if ( !strcmp( argv[ i ], "-lightmapdir" ) ) {
lmCustomDir = argv[i + 1];
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Lightmap directory set to %s\n", lmCustomDir );
externalLightmaps = qtrue;
Sys_Printf( "Storing all lightmaps externally\n" );
else if ( !strcmp( argv[ i ], "-bspfile" ) )
{
strcpy( BSPFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as bsp file\n", BSPFilePath );
}
else if ( !strcmp( argv[ i ], "-srffile" ) )
{
strcpy( surfaceFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as surface file\n", surfaceFilePath );
}
/* unhandled args */
else if ( !strcmp( argv[ i ], "-prtfile" ) )
{
strcpy( portalFilePath, argv[i + 1] );
+ argv[ i ] = NULL;
i++;
+ argv[ i ] = NULL;
Sys_Printf( "Use %s as portal file\n", portalFilePath );
}