2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-28 13:02:13 +01:00

engine: client: initialize variables in SPR_Width/Height/Frames functions, in case R_GetSpriteParms fails

This commit is contained in:
Alibek Omarov 2023-03-15 04:58:00 +03:00
parent 774ced312f
commit 3a956a1ad3

View File

@ -1372,7 +1372,7 @@ pfnSPR_Frames
*/
int EXPORT pfnSPR_Frames( HSPRITE hPic )
{
int numFrames;
int numFrames = 0;
ref.dllFuncs.R_GetSpriteParms( NULL, NULL, &numFrames, 0, CL_GetSpritePointer( hPic ));
@ -1387,7 +1387,7 @@ pfnSPR_Height
*/
static int GAME_EXPORT pfnSPR_Height( HSPRITE hPic, int frame )
{
int sprHeight;
int sprHeight = 0;
ref.dllFuncs.R_GetSpriteParms( NULL, &sprHeight, NULL, frame, CL_GetSpritePointer( hPic ));
@ -1402,7 +1402,7 @@ pfnSPR_Width
*/
static int GAME_EXPORT pfnSPR_Width( HSPRITE hPic, int frame )
{
int sprWidth;
int sprWidth = 0;
ref.dllFuncs.R_GetSpriteParms( &sprWidth, NULL, NULL, frame, CL_GetSpritePointer( hPic ));