mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
small regression fix.
This commit is contained in:
parent
c16b88d709
commit
9b2f4976c9
2 changed files with 20 additions and 2 deletions
|
|
@ -2002,7 +2002,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
stack[_STK + 1].setInt(result);
|
stack[_STK + 1].setFloat(result);
|
||||||
_STK++;
|
_STK++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -2139,7 +2139,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
||||||
{
|
{
|
||||||
bool isGlobal = code[ip];
|
bool isGlobal = code[ip];
|
||||||
|
|
||||||
U32 failIp = code[ip + isGlobal ? 3 : 2];
|
U32 failIp = code[ip + (isGlobal ? 3 : 2)];
|
||||||
|
|
||||||
IterStackRecord& iter = iterStack[_ITER];
|
IterStackRecord& iter = iterStack[_ITER];
|
||||||
iter.mIsGlobalVariable = isGlobal;
|
iter.mIsGlobalVariable = isGlobal;
|
||||||
|
|
|
||||||
|
|
@ -950,6 +950,24 @@ TEST(Script, MiscRegressions)
|
||||||
)");
|
)");
|
||||||
|
|
||||||
ASSERT_STREQ(regression3.getString(), "120 20");
|
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
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue