From 9033377e5e1d65c728ebfd7821243923e1c66128 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Wed, 16 Nov 2022 07:06:01 +0500 Subject: [PATCH] Fix strange sprintf usage. --- cl_dll/tri.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cl_dll/tri.cpp b/cl_dll/tri.cpp index bfcf10ad..51fcb60b 100644 --- a/cl_dll/tri.cpp +++ b/cl_dll/tri.cpp @@ -34,9 +34,7 @@ int UseTexture(HSPRITE &hsprSpr, char * str) { if (hsprSpr == 0) { - char sz[256]; - sprintf( sz, "%s", str ); - hsprSpr = SPR_Load( sz ); + hsprSpr = SPR_Load( str ); } 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_fZ = fZ; m_hsprSprite = 0; - sprintf( m_szSprite, "%s", szSprite ); + strcpy( m_szSprite, szSprite ); m_pNext = NULL; }