From 189e89ae212671601a03eb7f09342115f2374197 Mon Sep 17 00:00:00 2001 From: James Turk Date: Mon, 28 Feb 2011 21:15:55 -0500 Subject: [PATCH] fix vsnprintf --- GLFT_Font.cpp | 3 ++- GLFT_Font.hpp | 1 + README | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/GLFT_Font.cpp b/GLFT_Font.cpp index 0402974..929687b 100644 --- a/GLFT_Font.cpp +++ b/GLFT_Font.cpp @@ -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_); diff --git a/GLFT_Font.hpp b/GLFT_Font.hpp index 19f4bb6..6b0782e 100644 --- a/GLFT_Font.hpp +++ b/GLFT_Font.hpp @@ -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 diff --git a/README b/README index d117095..6676328 100644 --- a/README +++ b/README @@ -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