[quake3-commits] r1565 - in trunk/code: botlib qcommon renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun May 31 20:18:03 EDT 2009


Author: thilo
Date: 2009-05-31 20:18:02 -0400 (Sun, 31 May 2009)
New Revision: 1565

Modified:
   trunk/code/botlib/l_struct.c
   trunk/code/qcommon/common.c
   trunk/code/renderer/tr_init.c
Log:
Replace a few sprintf with Com_sprintf


Modified: trunk/code/botlib/l_struct.c
===================================================================
--- trunk/code/botlib/l_struct.c	2009-05-31 20:31:56 UTC (rev 1564)
+++ trunk/code/botlib/l_struct.c	2009-06-01 00:18:02 UTC (rev 1565)
@@ -346,7 +346,7 @@
 	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)

Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c	2009-05-31 20:31:56 UTC (rev 1564)
+++ trunk/code/qcommon/common.c	2009-06-01 00:18:02 UTC (rev 1565)
@@ -2382,7 +2382,7 @@
 	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 @@
 	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 @@
 #endif
 
 
-	sprintf(fbuffer, "%s/q3key", filename);
+	Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
 
 
 	Q_strncpyz( key, ikey, 17 );

Modified: trunk/code/renderer/tr_init.c
===================================================================
--- trunk/code/renderer/tr_init.c	2009-05-31 20:31:56 UTC (rev 1564)
+++ trunk/code/renderer/tr_init.c	2009-06-01 00:18:02 UTC (rev 1565)
@@ -518,7 +518,7 @@
 	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 );
 



More information about the quake3-commits mailing list