diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-06-01 00:18:02 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-06-01 00:18:02 +0000 |
commit | 1afcf706fa76e9d5d0ff7035b671a269a53014cf (patch) | |
tree | b2eab9e84e0f75c49e0415ff1c178ba6afc82578 /code | |
parent | 9443266c858435da2df22618c6a098c136e917d8 (diff) | |
download | ioquake3-aero-1afcf706fa76e9d5d0ff7035b671a269a53014cf.tar.gz ioquake3-aero-1afcf706fa76e9d5d0ff7035b671a269a53014cf.zip |
Replace a few sprintf with Com_sprintf
git-svn-id: svn://svn.icculus.org/quake3/trunk@1565 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/botlib/l_struct.c | 2 | ||||
-rw-r--r-- | code/qcommon/common.c | 6 | ||||
-rw-r--r-- | code/renderer/tr_init.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/code/botlib/l_struct.c b/code/botlib/l_struct.c index 303ecaa..d948dc3 100644 --- a/code/botlib/l_struct.c +++ b/code/botlib/l_struct.c @@ -346,7 +346,7 @@ int WriteFloat(FILE *fp, float value) char buf[128]; int l; - sprintf(buf, "%f", value); + Com_sprintf(buf, sizeof(buf), "%f", value); l = strlen(buf); //strip any trailing zeros while(l-- > 1) diff --git a/code/qcommon/common.c b/code/qcommon/common.c index fbeea3c..75e5f80 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -2382,7 +2382,7 @@ void Com_ReadCDKey( const char *filename ) { char buffer[33]; char fbuffer[MAX_OSPATH]; - sprintf(fbuffer, "%s/q3key", filename); + Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename); FS_SV_FOpenFileRead( fbuffer, &f ); if ( !f ) { @@ -2412,7 +2412,7 @@ void Com_AppendCDKey( const char *filename ) { char buffer[33]; char fbuffer[MAX_OSPATH]; - sprintf(fbuffer, "%s/q3key", filename); + Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename); FS_SV_FOpenFileRead( fbuffer, &f ); if (!f) { @@ -2447,7 +2447,7 @@ static void Com_WriteCDKey( const char *filename, const char *ikey ) { #endif - sprintf(fbuffer, "%s/q3key", filename); + Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename); Q_strncpyz( key, ikey, 17 ); diff --git a/code/renderer/tr_init.c b/code/renderer/tr_init.c index 0681919..dfe6ca0 100644 --- a/code/renderer/tr_init.c +++ b/code/renderer/tr_init.c @@ -518,7 +518,7 @@ void R_LevelShot( void ) { float xScale, yScale; int xx, yy; - sprintf( checkname, "levelshots/%s.tga", tr.world->baseName ); + Com_sprintf(checkname, sizeof(checkname), "levelshots/%s.tga", tr.world->baseName); source = ri.Hunk_AllocateTempMemory( glConfig.vidWidth * glConfig.vidHeight * 3 ); |