Thank you for your quick reply, gentlemen -- Andrew, yes, you are right, I did feed strtok() a temporary string. So it was the underlying temporary string that was modified outside of strtok(). All is well!