fread actually reads the whole file, it's just a li'l complicated.
You're most probably using:
pawn Код:
array = fread(file, io_read);
They way it's correctly done:
pawn Код:
while(fread(file, io_read))
{
//Code
}
A good idea of how it actually works can easily be found when looking into the SeifAdmin system, though I'm unsure if there's still a link around. Other then that, you could try looking it up in the dini.inc, but I wouldn't recommend that.