Sign in to follow this  

bug report of AS 2.13.0

This topic is 3435 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

the following codes: uint8 search_no(uint8[]@ cmd, uint16 len, uint8[] @rcv) //mbno is nx5 array, static { if (@rcv == null) print("null pointer"); return(255); } void main() { uint8[] cmd = { 0x02, 0x95, 0x45, 0x42, 0x32 }; uint8[] rcv; uint16 len = 8; search_no(cmd, cmd.length(), rcv); //This is OK! @rcv won't be null search_no(cmd, GET_LEN2(cmd), rcv); //This is OK! uint16 len = GET_LEN(cmd); search_no(cmd, len, rcv); //This is OK! //but search_no(cmd, GET_LEN(cmd), rcv); //@rcv is null } uint16 GET_LEN(uint8[]@ cmd) { return cmd[0]+3; } uint16 GET_LEN2(uint8[] cmd) { return cmd[0]+3; } it seems that, the reference release operation or the calling stack has bug.

Share this post


Link to post
Share on other sites

This topic is 3435 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this