[quake3-commits] r1959 - trunk/code/renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon May 2 18:01:39 EDT 2011


Author: thilo
Date: 2011-05-02 18:01:39 -0400 (Mon, 02 May 2011)
New Revision: 1959

Modified:
   trunk/code/renderer/tr_model.c
Log:
[23:59:05] <ZTurtleMan> Thilo: altName (created using va) does not point to model filename in developer-only printf as va is used to load images before the printf. http://pastebin.com/1KCjz6Ct


Modified: trunk/code/renderer/tr_model.c
===================================================================
--- trunk/code/renderer/tr_model.c	2011-05-02 20:30:14 UTC (rev 1958)
+++ trunk/code/renderer/tr_model.c	2011-05-02 22:01:39 UTC (rev 1959)
@@ -270,7 +270,7 @@
 	int			i;
 	char		localName[ MAX_QPATH ];
 	const char	*ext;
-	char		*altName;
+	char		altName[ MAX_QPATH ];
 
 	if ( !name || !name[0] ) {
 		ri.Printf( PRINT_ALL, "RE_RegisterModel: NULL name\n" );
@@ -358,7 +358,7 @@
 		if (i == orgLoader)
 			continue;
 
-		altName = va( "%s.%s", localName, modelLoaders[ i ].ext );
+		Com_sprintf( altName, sizeof (altName), "%s.%s", localName, modelLoaders[ i ].ext );
 
 		// Load
 		hModel = modelLoaders[ i ].ModelLoader( altName, mod );



More information about the quake3-commits mailing list