From dac8a746a7f80b50834e750927335d8d1a00c1c1 Mon Sep 17 00:00:00 2001 From: thilo Date: Tue, 25 Mar 2008 21:36:09 +0000 Subject: - Replace vsprintf function in bg_lib.c with vsnprintf implementation started by Patrick Powell. - Remove all calls to vsprintf in the engine and gamecode and replace them with calls to vsnprintf. git-svn-id: svn://svn.icculus.org/quake3/trunk@1277 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/cgame/cg_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'code/cgame') diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 3740bca..15f4db5 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -419,7 +419,7 @@ void QDECL CG_Printf( const char *msg, ... ) { char text[1024]; va_start (argptr, msg); - vsprintf (text, msg, argptr); + Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); trap_Print( text ); @@ -430,7 +430,7 @@ void QDECL CG_Error( const char *msg, ... ) { char text[1024]; va_start (argptr, msg); - vsprintf (text, msg, argptr); + Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); trap_Error( text ); @@ -441,7 +441,7 @@ void QDECL Com_Error( int level, const char *error, ... ) { char text[1024]; va_start (argptr, error); - vsprintf (text, error, argptr); + Q_vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); CG_Error( "%s", text); @@ -452,7 +452,7 @@ void QDECL Com_Printf( const char *msg, ... ) { char text[1024]; va_start (argptr, msg); - vsprintf (text, msg, argptr); + Q_vsnprintf (text, sizeof(text), msg, argptr); va_end (argptr); CG_Printf ("%s", text); -- cgit v1.2.3