--- gforth/prim 2009/04/20 19:11:11 1.240 +++ gforth/prim 2009/10/05 15:54:28 1.244 @@ -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