• Advertisement
Sign in to follow this  

FuncDef + Array -> Assertion failure

This topic is 2446 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

here is my script :


funcdef void CALLBACK();
void foo1()
{
Message(0, "test1\n");
}

void foo2()
{
Message(0, "test2\n");
}

CALLBACK@[] g_funcs = {@foo1, @foo2};

void main()
{
CALLBACK@ func = g_funcs[0];
func();
}



I'm also using the default array implemented in scriptarray.cpp
This code executes without a problem , but on quitting the application (asEngine->release()) I get assertion failure :
Program: as_configgroup.cpp
Line: 192
Expression: func->returnType.GetObjectType() != type

did I do something wrong here ?

Share this post


Link to post
Share on other sites
Advertisement
I'll look into this. It looks like it is a bug in AngelScript.

Thanks for the sample script to reproduce the problem.

Share this post


Link to post
Share on other sites
It wasn't a bug in AngelScript, actually it was my fault , cuz I have modified ScriptArray.cpp somewhere and made it do this. and now it's fixed
my bad, sorry

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement