Browse Source

Fix strange sprintf usage.

sohl1.2
Andrey Akhmichin 2 years ago
parent
commit
9033377e5e
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 6
      cl_dll/tri.cpp

6
cl_dll/tri.cpp

@ -34,9 +34,7 @@ int UseTexture(HSPRITE &hsprSpr, char * str)
{ {
if (hsprSpr == 0) if (hsprSpr == 0)
{ {
char sz[256]; hsprSpr = SPR_Load( str );
sprintf( sz, "%s", str );
hsprSpr = SPR_Load( sz );
} }
return gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)gEngfuncs.GetSpritePointer( hsprSpr ), 0 ); return gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)gEngfuncs.GetSpritePointer( hsprSpr ), 0 );
@ -54,7 +52,7 @@ CShinySurface::CShinySurface( float fScale, float fAlpha, float fMinX, float fMa
m_fMaxX = fMaxX; m_fMaxY = fMaxY; m_fMaxX = fMaxX; m_fMaxY = fMaxY;
m_fZ = fZ; m_fZ = fZ;
m_hsprSprite = 0; m_hsprSprite = 0;
sprintf( m_szSprite, "%s", szSprite ); strcpy( m_szSprite, szSprite );
m_pNext = NULL; m_pNext = NULL;
} }

Loading…
Cancel
Save