ValidateList() bug?

NodeCanvas Forums Support ValidateList() bug?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9631

    Taken from ActionList.cs, the following method seems a little off:

    It should have a i-- right after actions.RemoveAt(i) otherwise it skips an element.

    initial actions = [null,null,value1]

    i = 0; action is removed at 0 => actions [null,value1]
    i = 1; action at 1 is not null
    loop completed

    resulting actions = [null,value1]

    Besides i-- it is also possible to count the loop backwards and avoid messing with the iterator.

    #9633
    Gavalakis
    Keymaster

    Hello,

    Thanks for your report. I will fix that.
    By the way, it’s totaly unlikely that you will end up with a null action task in the list, since missing tasks (and nodes) are replaced automaticaly with a MissingTask/MissingNode type.
    Did you somewhow managed to end up with a null action task in the list?
    If so I will be glad to know how, since it might be a bug there.

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #9632

    Hi,

    No, that didn’t happen. I just noticed the function and the Remove() caught my eye.

    Thanks for listening & fixing 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.