various fixes and memory corruption bug.

This commit is contained in:
Jeff Hutchinson 2021-09-09 19:30:32 -04:00
parent 27a4868b6e
commit 35b33f1864
4 changed files with 35 additions and 8 deletions

View file

@ -969,8 +969,6 @@ TEST(Script, MiscRegressions)
ASSERT_EQ(regression4.getFloat(), 0.5);
Con::setBoolVariable("$Debug::DumpByteCode", true);
ConsoleValue regression5 = RunScript(R"(
function noOpInc()
{
@ -982,6 +980,33 @@ TEST(Script, MiscRegressions)
)");
ASSERT_EQ(regression5.getInt(), 2);
ConsoleValue regression6 = RunScript(R"(
function SimObject::crashMe(%this, %line)
{
return %line @ "1";
}
function doTest()
{
%obj = new SimObject();
for (%i = 0; %i < 99999; %i++)
{
%function = "crashMe";
if (%obj.isMethod(%function))
{
%line = "abcdefg";
%output = %obj.call(%function, %line);
}
}
return true;
}
return doTest();
)");
ASSERT_EQ(regression6.getBool(), true);
}
#endif