mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
small regression fix.
This commit is contained in:
parent
c16b88d709
commit
9b2f4976c9
|
|
@ -2002,7 +2002,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
break;
|
||||
}
|
||||
|
||||
stack[_STK + 1].setInt(result);
|
||||
stack[_STK + 1].setFloat(result);
|
||||
_STK++;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2139,7 +2139,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
{
|
||||
bool isGlobal = code[ip];
|
||||
|
||||
U32 failIp = code[ip + isGlobal ? 3 : 2];
|
||||
U32 failIp = code[ip + (isGlobal ? 3 : 2)];
|
||||
|
||||
IterStackRecord& iter = iterStack[_ITER];
|
||||
iter.mIsGlobalVariable = isGlobal;
|
||||
|
|
|
|||
|
|
@ -950,6 +950,24 @@ TEST(Script, MiscRegressions)
|
|||
)");
|
||||
|
||||
ASSERT_STREQ(regression3.getString(), "120 20");
|
||||
|
||||
ConsoleValue regression4 = RunScript(R"(
|
||||
function doTest()
|
||||
{
|
||||
%slider = new GuiSliderCtrl()
|
||||
{
|
||||
range = "0 2";
|
||||
ticks = 5;
|
||||
active = true;
|
||||
};
|
||||
|
||||
%slider.setValue(0.5);
|
||||
return %slider.getValue();
|
||||
}
|
||||
return doTest();
|
||||
)");
|
||||
|
||||
ASSERT_EQ(regression4.getFloat(), 0.5);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue