If you use $fread to read an empty invalid line on a file, eg file.txt, it will return an empty line TWICE instead of once.
Can you provide an example of what you mean?
eg you have a file, named test.txt
inside it contains:
abc
blah
2 lines
no space
1 line
--------
If you use $fread, you get this result
abc
>invalid line
>invalid line
blah
>invalid line
>invalid line
>invalid line
>invalid line
2 lines
no space
>invalid line
>invalid line
1 line
------------
$fread supposed to show this:
abc
>invalid line
blah
>invalid line
>invalid line
2 lines
no space
>invalid line
1 line
It works here.
fopen x test.txt
while (1) {
echo -a * $fread(x)
if ($feof) break
}
fclose x
-
* fopen opened 'x' (C:\MIRC\MIRC 6.1\test.txt)
-
* abc
*
* blah
*
*
* 2 lines
* no space
*
* 1 line
-
* fclose closed 'x' (C:\MIRC\MIRC 6.1\test.txt)
-