--- gforth/prim 2009/05/12 16:54:58 1.242 +++ gforth/prim 2009/06/29 20:21:28 1.243 @@ -1836,13 +1836,15 @@ wior = IOR(ftruncate(fileno((FILE *)wfil read-file ( c_addr u1 wfileid -- u2 wior ) file read_file /* !! fread does not guarantee enough */ u2 = fread(c_addr, sizeof(Char), u1, (FILE *)wfileid); +if (u2>0) + gf_regetc((FILE *)wfileid); wior = FILEIO(u2