Reorder to check for EOF before incrementing

Clarify that the check for EOF is to be done prior to incrementing pointer.