use snprintf instead of strcpy, strcat

This commit is contained in:
Garux 2020-01-22 00:03:16 +03:00
parent 1c73baa8b9
commit de8171f1ea

View File

@ -419,9 +419,7 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){
} }
if ( count == index ) { if ( count == index ) {
strcpy( g_strLoadedFileLocation, file->unzFilePath ); snprintf( g_strLoadedFileLocation, sizeof( g_strLoadedFileLocation ), "%s :: %s", file->unzFilePath, filename );
strcat( g_strLoadedFileLocation, " :: " );
strcat( g_strLoadedFileLocation, filename );
memcpy( file->zipfile, &file->zipinfo, sizeof( unz_s ) ); memcpy( file->zipfile, &file->zipinfo, sizeof( unz_s ) );