[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

This commit is contained in:
Thilo Schulz 2011-05-02 22:01:39 +00:00
parent d37b2da593
commit bd2f6dbf05

View file

@ -270,7 +270,7 @@ qhandle_t RE_RegisterModel( const char *name ) {
int i; int i;
char localName[ MAX_QPATH ]; char localName[ MAX_QPATH ];
const char *ext; const char *ext;
char *altName; char altName[ MAX_QPATH ];
if ( !name || !name[0] ) { if ( !name || !name[0] ) {
ri.Printf( PRINT_ALL, "RE_RegisterModel: NULL name\n" ); ri.Printf( PRINT_ALL, "RE_RegisterModel: NULL name\n" );
@ -358,7 +358,7 @@ qhandle_t RE_RegisterModel( const char *name ) {
if (i == orgLoader) if (i == orgLoader)
continue; continue;
altName = va( "%s.%s", localName, modelLoaders[ i ].ext ); Com_sprintf( altName, sizeof (altName), "%s.%s", localName, modelLoaders[ i ].ext );
// Load // Load
hModel = modelLoaders[ i ].ModelLoader( altName, mod ); hModel = modelLoaders[ i ].ModelLoader( altName, mod );