projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix to glutInit() command-line argument compaction - Patch #1027724 from takeshi2
[freeglut]
/
src
/
freeglut_init.c
diff --git
a/src/freeglut_init.c
b/src/freeglut_init.c
index
0853d35
..
7b49169
100644
(file)
--- a/
src/freeglut_init.c
+++ b/
src/freeglut_init.c
@@
-597,16
+597,14
@@
void FGAPIENTRY glutInit( int* pargc, char** argv )
/*
* Compact {argv}.
*/
/*
* Compact {argv}.
*/
- j = 2;
+ j = 1;
for( i = 1; i < *pargc; i++, j++ )
{
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 ];
argv[ i ] = argv[ j ];
- }
}
#endif /* TARGET_HOST_WINCE */
}
#endif /* TARGET_HOST_WINCE */
@@
-864,8
+862,8
@@
void FGAPIENTRY glutInitDisplayString( const char* displayMode )
break ;
case 28 : /* Unrecognized */
break ;
case 28 : /* Unrecognized */
- printf ( "WARNING - Display string token not recognized: %s\n",
- token );
+ fgWarning ( "WARNING - Display string token not recognized: %s",
+ token );
break ;
}
break ;
}