Jump to content
  • Advertisement
Sign in to follow this  
loboWu

bug report of AS 2.13.0

This topic is 3770 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
Advertisement
Thanks for the bug report. I'll look into this a.s.a.p. It looks like it could be a problem with a temporary variable being reused too soon while evaluating the arguments.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!