Page 1 of 1

PostPosted: Sun May 28, 2006 4:42 pm
by ruydiaz
Hi,

I am trying to write an application that reads a real txt file from the card which is larger that the string length limit of 512.

As a workaround it i tried reading it repeatedly with a FileStream.ReadString but when the remainder (or the file itself) is smaller than 512 it simply doesn't read anything in the last ReadString (or the first if the file is smaller)

vol.open(lstFiles.gettext(lstFiles.selitem),vfsModeRead,F);
Fs.file = F;
while (!F.eof) {
dummy="";
alert( F.size + " " + F.offset + " " + dummy);
Fs.readString(&dummy);
alert(F.size + " " + F.offset + " " + dummy);
dummyWhole += dummy;
}

PostPosted: Mon May 29, 2006 3:38 am
by dewey
It looks like the file read code doesn't properly handle strings that extend to EOF. I'll fix this for the next version. I'll also look at removing the 512 character limit.

PostPosted: Mon May 29, 2006 8:03 pm
by ruydiaz
Thank you and I look forward to these bug fixes as the solution I had to resource to (pad the file with dummies) slows down my application a lot. Please keep me posted.

Regards,

Ruy