From 7e1de34b1219abb32a91175fe5f463c0bddd6d25 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 2 May 2011 22:01:39 +0000 Subject: 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 --- src/renderer/tr_model.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/renderer/tr_model.c b/src/renderer/tr_model.c index 7f61cb08..af42db3a 100644 --- a/src/renderer/tr_model.c +++ b/src/renderer/tr_model.c @@ -271,7 +271,7 @@ qhandle_t RE_RegisterModel( const char *name ) { 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" ); @@ -359,7 +359,7 @@ qhandle_t RE_RegisterModel( const char *name ) { 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 ); -- cgit