Don't modify loop control variable when looking for comments.

The assignment [_, cur] modifies cur variable and does not increment it
if no result is found.
Use different variable name for searchpos return value and increase cur
at the end of loop.