X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_init.c;h=7b49169a7f5cb221eca28b13a0dc6d2bde4c27c6;hb=191f167c1b44679707028d96aae8a2d67fecce30;hp=0853d35ceca683c7bcdf40bc9f808c3bde2a6696;hpb=006650e1dd72e73249d41e2bcea8b1668262a999;p=freeglut diff --git a/src/freeglut_init.c b/src/freeglut_init.c index 0853d35..7b49169 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -597,16 +597,14 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) /* * Compact {argv}. */ - j = 2; + j = 1; for( i = 1; i < *pargc; i++, j++ ) { - if( argv[ i ] == NULL ) - { - /* Guaranteed to end because there are "*pargc" arguments left */ - while ( argv[ j ] == NULL ) - j++; + /* Guaranteed to end because there are "*pargc" arguments left */ + while ( argv[ j ] == NULL ) + j++; + if (i != j) argv[ i ] = argv[ j ]; - } } #endif /* TARGET_HOST_WINCE */ @@ -864,8 +862,8 @@ void FGAPIENTRY glutInitDisplayString( const char* displayMode ) break ; case 28 : /* Unrecognized */ - printf ( "WARNING - Display string token not recognized: %s\n", - token ); + fgWarning ( "WARNING - Display string token not recognized: %s", + token ); break ; }