int main(int, char **) {
asIScriptEngine * engine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
std::string script =
"void noop() {}\n"
"int fuzzy() {\n"
" return noop();\n"
"}\n";
engine->AddScriptSection("", "", script.c_str(), script.length());
engine->Build(""); // crash in this call
return 0;
}
In debug mode it'll trigger an assertion in as_compiler.cpp on line 6643. In release mode it'll cause an access violation in as_module.cpp on line 807. This is with the default options (no changes to the config header).
I found this out when I accidentally registered a function with an "int f()" signature as "void f()".
Bug in AngelScript 2.8.1 compiler
There seems to be a bug in AngelScript 2.8.1 compiler that involves processing the return statement. If you have a void returning function and attempt to return the result of a call to that function, the compiler dies. Example:
Thanks SiCrane,
I'll have this fixed for 2.9.0.
Regards,
Andreas
I'll have this fixed for 2.9.0.
Regards,
Andreas
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
Popular Topics
Advertisement