diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index 12bcbf3..2cdb236 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1207,3 +1207,7 @@ and "freeglut" (312) Added multisampling support for *nix and Windows; some other pixel format changes for Windows +(313) Added Markus Henschel's change (e-mail to developers' list, June 28, +2006) to have the "glutInitDisplayString" ignore numerical assignments to +tokens as a temporary fix. + diff --git a/freeglut/freeglut/src/freeglut_init.c b/freeglut/freeglut/src/freeglut_init.c index fbf9065..702f1e5 100644 --- a/freeglut/freeglut/src/freeglut_init.c +++ b/freeglut/freeglut/src/freeglut_init.c @@ -727,9 +727,16 @@ void FGAPIENTRY glutInitDisplayString( const char* displayMode ) { /* Process this token */ int i ; + + /* Temporary fix: Ignore any length specifications and at least + * process the basic token + * TODO: Fix this permanently + */ + size_t cleanlength = strcspn ( token, "=<>~!" ); + for ( i = 0; i < NUM_TOKENS; i++ ) { - if ( strcmp ( token, Tokens[i] ) == 0 ) break ; + if ( strncmp ( token, Tokens[i], cleanlength ) == 0 ) break ; } switch ( i )