1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-05 07:40:24 +00:00

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
This commit is contained in:
SteveMcNeill 2016-03-04 23:06:22 -05:00
parent 87b4783dd7
commit d9aa69afb9

View file

@ -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<n);
return str;