I got it
Not quite.
You reset the buffer as soon as you see "on" so "on" is no longer in the buffer, but then you read the '<'.
Since you never test for this, it stays in the buffer, no matter what else you read in.
I got it
Not quite.
You reset the buffer as soon as you see "on" so "on" is no longer in the buffer, but then you read the '<'.
Since you never test for this, it stays in the buffer, no matter what else you read in.