I noticed a weird situation lately when I tried to extend/reduce a list to a fixed length. If a list is shorter than 10 items, I wanted to extend it with dashes, if it is longer than 10, I want to reduce it. As far as I know there are no nodes that do this kind of action, so I came up with some code. I use a Ternary Operator, and as long as the list is longer than the current number from the range, it reads the item at index, else it produces a dash.
The result is correct:
But I receive a warning that the GetItemAtIndex tried to get an item outside the bounds.
What is wrong here? It runs the operator 10 times (because of the range 0..9), so after the 3rd value it should no longer evaluate the List.GetItemAtIndex.
Strange thing is that it sometimes work. If I create a new graph and only add these nodes, it works (not always though). When I have saved it, it mostly produce this error.



