🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

opCall access violation

Started by
1 comment, last by WitchLord 9 years, 11 months ago

The following script in 2.29.1 and earlier versions:


class foo {
  void opCall(string) {}
}
void main() {
  array<foo> bar(1);
  bar[0]("");
}

causes an access violation on attempt to execute. As far as I can tell, the conditions are rather specific and it's required that opCall has at least one string or string reference (or another similar object) argument and it's also necessary for opCall to be called on an array element (or perhaps another reference) rather than a freestanding instance. If the call to opCall is made explicit, i.e.


bar[0].opCall("");

the error will not occur either.

Advertisement

Thanks for being so specific on the error report. From what you describe it sounds like the compiler is likely overwriting a temporary variable before it is being used.

I'll have it fixed as soon as possible.

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

I've fixed this bug in revision 1985.

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