Fix bug in MSVCRT handling of CTRL-Z at EOF of text files

Dan Kegel dank at
Sat Aug 5 11:02:29 CDT 2006

On 8/5/06, David D. Hagood <wowbagger at> wrote:
> The bug in the handling of text mode files with CTRL-Z's at the end is back.
> Due to compatibility with DOS, which is compatible with CP/M, text mode
> files may be padded with a number of CTRL-Z characters (\x1A) to fill
> out a sector.

IIRC, the right behavior is to strip a ^Z
*and any following bytes*.  The very first ^Z is the EOF marker.
Your code doesn't do this.  Can you add a conformance test
that distinguishes between these two theories?
- Dan

More information about the wine-devel mailing list