fix vsnprintf

This commit is contained in:
James Turk 2011-02-28 21:15:55 -05:00
parent a4248ddef7
commit 189e89ae21
3 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
// by James Turk (james.p.turk@gmail.com)
// Based on work by Marijn Haverbeke (http://marijn.haverbeke.nl)
//
// Version 0.2.2 - Released 28 February 2011 - Fixed linux compilation.
// Version 0.2.1 - Released 2 March 2008 - Updated contact information.
// Version 0.2.0 - Released 18 July 2005 - Added beginDraw/endDraw,
// Changed vsprintf to vsnprintf
@ -269,7 +270,7 @@ void GLFT_Font::drawText(float x, float y, const char *str, ...) const
char buf[1024];
va_start(args,str);
std::vsnprintf(buf, 1024, str, args); // avoid buffer overflow
vsnprintf(buf, 1024, str, args); // avoid buffer overflow
va_end(args);
glBindTexture(GL_TEXTURE_2D, texID_);

View File

@ -2,6 +2,7 @@
// by James Turk (james.p.turk@gmail.com)
// Based on work by Marijn Haverbeke (http://marijn.haverbeke.nl)
//
// Version 0.2.2 - Released 28 February 2011 - Fixed linux compilation.
// Version 0.2.1 - Released 2 March 2008 - Updated contact information.
// Version 0.2.0 - Released 18 July 2005 - Added beginDraw/endDraw,
// Changed vsprintf to vsnprintf

1
README
View File

@ -2,6 +2,7 @@
// by James Turk (james.p.turk@gmail.com)
// Based on work by Marijn Haverbeke (http://marijn.haverbeke.nl)
//
// Version 0.2.2 - Released 28 February 2011 - Fixed linux compilation.
// Version 0.2.1 - Released 2 March 2008 - Updated contact information.
// Version 0.2.0 - Released 18 July 2005 - Added beginDraw/endDraw,
// Changed vsprintf to vsnprintf