From 10a6a314ac8316afcd61dc7071bda8261b0dbb45 Mon Sep 17 00:00:00 2001 From: Stas'M Date: Thu, 17 May 2018 21:48:46 +0300 Subject: [PATCH] Panel: Fix SetFrame out of index http://doom2d.org/forum/viewtopic.php?f=36&t=2576 --- src/game/g_panel.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index c95c271..c3d8224 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -906,7 +906,7 @@ begin (FTextureIDs[FCurTexture].AnTex <> nil) and (Width > 0) and (Height > 0) and (FAlpha < 255) then begin - FCurFrame := ClampInt(Frame, 0, FTextureIDs[FCurTexture].AnTex.TotalFrames); + FCurFrame := ClampInt(Frame, 0, FTextureIDs[FCurTexture].AnTex.TotalFrames - 1); FCurFrameCount := Count; FTextureIDs[FCurTexture].AnTex.CurrentFrame := FCurFrame; FTextureIDs[FCurTexture].AnTex.CurrentCounter := FCurFrameCount; -- 2.29.2