X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_font.c;h=80263967d860d512858280c380d5346e58b24c41;hb=4166c6ebc97701e0528fd81b7810131183940653;hp=d7547550eafaadbbb48e1e7e05aff4eb46fcb50c;hpb=6a0e5d4b27c472ce3216395e22f9a6602a9fb665;p=freeglut diff --git a/src/freeglut_font.c b/src/freeglut_font.c index d754755..8026396 100644 --- a/src/freeglut_font.c +++ b/src/freeglut_font.c @@ -154,8 +154,8 @@ void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string ) * A newline will simply translate the next character's insertion * point back to the start of the line and down one line. */ - while( c = *string++ ) - if( string[c] == '\n' ) + while( ( c = *string++ ) ) + if( c == '\n' ) { glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL ); x = 0.0f; @@ -202,7 +202,7 @@ int FGAPIENTRY glutBitmapLength( void* fontID, const unsigned char* string ) if ( !string || ! *string ) return 0; - while( c = *string++ ) + while( ( c = *string++) ) { if( c != '\n' )/* Not an EOL, increment length of line */ this_line_length += *( font->Characters[ c ]); @@ -273,7 +273,7 @@ void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string ) * A newline will simply translate the next character's insertion * point back to the start of the line and down one line. */ - while( c = *string++ ) + while( ( c = *string++) ) if( c < font->Quantity ) { if( c == '\n' ) @@ -338,7 +338,7 @@ int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string ) if ( !string || ! *string ) return 0; - while( c = *string++ ) + while( ( c = *string++ ) ) if( c < font->Quantity ) { if( c == '\n' ) /* EOL; reset the length of this line */