I've just spent a few hours trying to work out why my level editor wasn't loading certain level files properly. After a certain point, everything byte starts returning EOF, -1.

Turns out it was the $1A character tripping it up. I did a bit of searching around and all I could find was one thread by another person with the same problem and some source code with a comment about how $1A is meant to mean end of file in the DOS instruction set or something. Strange.

Can anyone tell my why this happens, and how I can get around it?

Cheers.