bevy_reflect::List::iter wraps silently on release #13230
Labels
A-Reflection
Runtime information about types
C-Bug
An unexpected or incorrect behavior
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
X-Uncontroversial
This work is generally agreed upon
Bevy version
0.13
What you did
Iterate over a
ListIter
until overflow of its usize.What went wrong
You are back at the beginning.
Proposed Fix
ListIter
should only increment its counter when the current index isSome
. This would fix this behaviour. It does add a branch in a potential hot spot, but I don't think its much worse when you are already reflect-ing all over the place.Repro
https://learnbevy.com/playground?share=679a8e4ac4eb4c72a2e1e16114eb8717da4257eb6068becaecd7ce45c51ce2be
The text was updated successfully, but these errors were encountered: