I have been using fgets() to read lines of a file I have and store them in a linked list. This has been working very well but after the last line I seem to end up with "x(smiley face)>" in the list. I have checked and this string does indeed result from the last call to fgets before EOF. I have used a hex editor to check the file and at the end of the last line is just the usual 0D 0A. What is going on here?