Browse Source

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

pull/2/head
Andrey Akhmichin 4 years ago committed by Alibek Omarov
parent
commit
63d8794902
  1. 8
      ref_soft/r_image.c

8
ref_soft/r_image.c

@ -805,13 +805,17 @@ GL_CheckTexName
*/ */
qboolean GL_CheckTexName( const char *name ) qboolean GL_CheckTexName( const char *name )
{ {
int len;
if( !COM_CheckString( name ) ) if( !COM_CheckString( name ) )
return false; return false;
len = Q_strlen( name );
// because multi-layered textures can exceed name string // 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; return false;
} }

Loading…
Cancel
Save