ref_soft: r_image.c: remove duplicated Q_strlen() call.

This commit is contained in:
Andrey Akhmichin 2020-11-29 05:51:00 +05:00 committed by Alibek Omarov
parent ede9e5095d
commit 63d8794902
1 changed files with 6 additions and 2 deletions

View File

@ -805,13 +805,17 @@ GL_CheckTexName
*/
qboolean GL_CheckTexName( const char *name )
{
int len;
if( !COM_CheckString( name ) )
return false;
len = Q_strlen( name );
// because multi-layered textures can exceed name string
if( Q_strlen( name ) >= sizeof( r_images->name ))
if( len >= sizeof( r_images->name ))
{
gEngfuncs.Con_Printf( S_ERROR "LoadTexture: too long name %s (%d)\n", name, Q_strlen( name ));
gEngfuncs.Con_Printf( S_ERROR "LoadTexture: too long name %s (%d)\n", name, len);
return false;
}