The logic for detecting EOF was wrong and would fail if we ever requested more than 16k past the last read position. llvm-svn: 222505