From d9aa69afb970f0e9dc5b807fb9aa2d0eee9ae700 Mon Sep 17 00:00:00 2001 From: SteveMcNeill Date: Fri, 4 Mar 2016 23:06:22 -0500 Subject: [PATCH] Change to INPUT routine so when reading a byte at a time, we'll find proper EOF markers. A fix to the issue described here: http://www.qb64.net/forum/index.php?topic=13195.msg113782#msg113782 --- internal/c/libqb.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index e091f4ee0..744bb408f 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -17891,6 +17891,12 @@ qbs *func_input(int32 n,int32 i,int32 passed){ if (c==-1){error(62); return str;}//Input past end of file if (c==-2){error(75); return str;}//path/file access error str->chr[x]=c; + + if (gfs_file[i].eof_passed!=1) { //If we haven't declared the End of the File, check to see if the next byte is an EOF byte + c=file_input_chr(i); //read the next byte + if (gfs_file[i].eof_passed!=1) {gfs_setpos(i,gfs_getpos(i)-1);} //and if it's not EOF, move our position back to where it should be + } + x++; }while(x