Advertisement

When using an infinite loop using `for statement` and stopping with SaveBytecode

Started by April 13, 2018 01:45 AM
2 comments, last by WitchLord 6 years, 7 months ago

void main()
{
  for(;;)
  {
  }
}

After preparing the above code, executing asbuild stopped at assert.

$ ./asbuild.exe config.txt script.as x.bin
Assertion failed: *(asBYTE*)(bc+length-1) == asBC_RET, file ..\..\source\as_restore.cpp, line 4671

However, `while (true)` is fine.

 

Also, I have not examined this properly,

It seems to be related to this matter, so I will write on it later.

void test()
{
  :
  return;
  :
  :
}

Perhaps, I think so,
If you have an `Unreachable code` like this, after you do
SaveBytecode, you` assert` this binary on loading.

 

Thanks. I'll investigate this.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement

I've fixed this in revision 2486.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement