Browse Source

utils: mdldec: add size argument to COM_FileBase calls

pull/2/head
Alibek Omarov 2 years ago
parent
commit
cfdfdd5c93
  1. 2
      utils/mdldec/mdldec.c
  2. 4
      utils/mdldec/qc.c
  3. 2
      utils/mdldec/smd.c
  4. 2
      utils/mdldec/texture.c

2
utils/mdldec/mdldec.c

@ -244,7 +244,7 @@ static qboolean LoadMDL( const char *modelname ) @@ -244,7 +244,7 @@ static qboolean LoadMDL( const char *modelname )
}
}
COM_FileBase( modelname, modelfile );
COM_FileBase( modelname, modelfile, sizeof( modelfile ));
SequenceNameFix();

4
utils/mdldec/qc.c

@ -329,7 +329,7 @@ static void WriteBodyGroupInfo( FILE *fp ) @@ -329,7 +329,7 @@ static void WriteBodyGroupInfo( FILE *fp )
{
model = (mstudiomodel_t *)( (byte *)model_hdr + bodypart->modelindex );
COM_FileBase( model->name, modelname );
COM_FileBase( model->name, modelname, sizeof( modelname ));
fprintf( fp, "$body \"%s\" \"%s\"\n\n", bodypart->name, modelname );
continue;
@ -349,7 +349,7 @@ static void WriteBodyGroupInfo( FILE *fp ) @@ -349,7 +349,7 @@ static void WriteBodyGroupInfo( FILE *fp )
continue;
}
COM_FileBase( model->name, modelname );
COM_FileBase( model->name, modelname, sizeof( modelname ));
fprintf( fp, "studio \"%s\"\n", modelname );
}

2
utils/mdldec/smd.c

@ -465,7 +465,7 @@ static void WriteReferences( void ) @@ -465,7 +465,7 @@ static void WriteReferences( void )
if( !Q_strncmp( model->name, "blank", 5 ) )
continue;
COM_FileBase( model->name, name );
COM_FileBase( model->name, name, sizeof( name ));
len = Q_snprintf( filename, MAX_SYSPATH, "%s%s.smd", destdir, name );

2
utils/mdldec/texture.c

@ -39,7 +39,7 @@ static void WriteBMP( mstudiotexture_t *texture ) @@ -39,7 +39,7 @@ static void WriteBMP( mstudiotexture_t *texture )
bmp_t bmp_hdr = {0,};
size_t texture_size;
COM_FileBase( texture->name, texturename );
COM_FileBase( texture->name, texturename, sizeof( texturename ));
len = Q_snprintf( filename, MAX_SYSPATH, "%s%s.bmp", destdir, texturename );
if( len == -1 )

Loading…
Cancel
Save