Maulin Vasavada wrote:1. The post increment in the original code was happening even when while condition didn't match. So to you point it IS going one pointer ahead than the actual mismatch point ('why' part of this we will blame on the 'specific' parsing logic )
2. To fix that I added one more p++ after the while loop after my change...
In which case, I suspect it's
wrong, and you just haven't discovered
when yet. I could be wrong, but those first loops you listed suggest not.
The loop will only exit when there is a MISmatch, at which point
p will hold the index at which it occurred. It seems a very strange thing to then increment the index
again (without a length check) to get the index
after that.
However, if that's the way it works and you can understand it, don't let me stop you.
Winston