mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 05:29:51 +01:00
engine: client: initialize variables in SPR_Width/Height/Frames functions, in case R_GetSpriteParms fails
This commit is contained in:
parent
774ced312f
commit
3a956a1ad3
@ -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 ));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user