git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@26
7f0cb862-5218-0410-a997-
914c9d46530a
/*
* Make sure the character we want to output is valid
*/
/*
* Make sure the character we want to output is valid
*/
- freeglut_return_if_fail( character >= 0 && character < font->Quantity );
+ freeglut_return_if_fail( character >= 0 && character < font->256 );
/*
* Then find the character we want to draw
/*
* Then find the character we want to draw
/*
* Make sure the character we want to output is valid
*/
/*
* Make sure the character we want to output is valid
*/
- freeglut_return_val_if_fail( character > 0 && character < font->Quantity, 0 );
+ freeglut_return_val_if_fail( character > 0 && character < font->256, 0 );
/*
* Scan the font looking for the specified character
/*
* Scan the font looking for the specified character
schar = font->Characters[character];
schar = font->Characters[character];
+ freeglut_return_if_fail( schar );
+
strip = schar->Strips;
for (i = 0; i < schar->Number; i++, strip++)
strip = schar->Strips;
for (i = 0; i < schar->Number; i++, strip++)
*/
freeglut_return_if_fail( character >= 0 && character < font->Quantity );
*/
freeglut_return_if_fail( character >= 0 && character < font->Quantity );
- return (font->Characters[character]->Right);
+ schar = font->Characters[character];
+
+ freeglut_return_if_fail( schar );
+
+ return (schar->Right);