A recent fix to this issue exposed a design flaw in for loops, with int indexes, comparing against a_vector.size() values. Normally this could be fine, but in circumstances where an a_vector element is erased and i-- is decremented on the 0 index value, now we got an issue.
Solution
Comb through the code, locate for loops with this code flaw, and clean them up. You could find them with something like:
Problem
A recent fix to this issue exposed a design flaw in
for
loops, withint
indexes, comparing againsta_vector.size()
values. Normally this could be fine, but in circumstances where ana_vector
element is erased andi--
is decremented on the0
index value, now we got an issue.Solution
Comb through the code, locate for loops with this code flaw, and clean them up. You could find them with something like:
An example where I did something similar: