From 3957c689c26a9a3213be891fe3761eb2cd92773d Mon Sep 17 00:00:00 2001 From: redink1 Date: Tue, 5 Jun 2018 23:52:58 +0000 Subject: [PATCH] * (Bugfix) Fixed DinkC sp_frame(x, -1) issue, where it would set the frame to 1 instead of getting the current frame. This issue was accidentally added in r1492 (sp_frame crash protection). git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1619 353e56fe-9613-0410-8469-b96ad8e6f29c --- source/dink/dink.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dink/dink.cpp b/source/dink/dink.cpp index 09a3ea3..2951843 100644 --- a/source/dink/dink.cpp +++ b/source/dink/dink.cpp @@ -9330,8 +9330,8 @@ pass: int32 p[20] = {1,1,0,0,0,0,0,0,0,0}; if (get_parms(ev[1], script, h, p)) { - - if (g_nlist[1] < 0 || g_nlist[1] >= C_MAX_SPRITE_FRAMES) + //Allow -1, in case a script needs to get the current frame. + if (g_nlist[1] < -1 || g_nlist[1] >= C_MAX_SPRITE_FRAMES) { LogMsg("sp_frame trying to set something to frame %d? Illegal, forcing to 1.", g_nlist[1]); g_nlist[1] = 1;