file handling bug - 29/06/11 01:24 PM
After $freading a whole file, mIRC doesn't fill the 'end of file' propriety, though another call of $fread (returning $null and not even 0) fills the propriety.
Code:
alias fh_bug { bset &a 2000 1 bwrite test -1 -1 &a .fopen test test echo -a file: $lof(test) bytes echo -a read $fread(test,2000,&r) bytes echo -a end of file or error ? $fopen(test).eof - $fopen(test).err echo -a read $fread(test,2000,&r) bytes echo -a end of file or error ? $fopen(test).eof - $fopen(test).err .fclose test .remove test }