If the iterator has just been created but next() had not been called, then when it was restored, every child iterator was bumped by 1 value.
So if \0[0-9][0-9] was the regex, we were seeing the last value be:
x63
then save
then restore and first word after restore was
x74
when the proper word would have been x73. So x73, x83, x93, x04, x14, x24, x34, x44, x54, x64 were never being generated.
The bug is not storing/restoring the 'state' value (enum) within the iterator. So if the iterator does not have the next() called, it has all of the state values in the resetted state, which is almost certainly not right.
If the iterator has just been created but next() had not been called, then when it was restored, every child iterator was bumped by 1 value.
So if \0[0-9][0-9] was the regex, we were seeing the last value be:
x63 then save then restore and first word after restore was x74 when the proper word would have been x73. So x73, x83, x93, x04, x14, x24, x34, x44, x54, x64 were never being generated.
The bug is not storing/restoring the 'state' value (enum) within the iterator. So if the iterator does not have the next() called, it has all of the state values in the resetted state, which is almost certainly not right.