Closed GoogleCodeExporter closed 9 years ago
exactly this is changed in r144 (merge from er9x :-)) ).
The original implementation was not thought to handle larger files.
Original comment by th...@t-online.de
on 13 Sep 2010 at 6:44
Yeah, I saw :) (and I'm flattered).
But the issue concerns the function EFile::read(). In r144 it's still using 8
bytes.
This caused me a very big headache. The compiler doesn't tell you anything is
wrong and the struct can go over 255 bytes but as soon as the compressed file
size goes over 255 bytes you still have a problem.
The function uses a byte when reading. When the compressed size is over 255
bytes then the line: uint8_t len = eeFs.files[m_fileId].size - m_pos;
defaults to a byte and the information is written to the beginning of the
struct.
Original comment by erezra...@gmail.com
on 13 Sep 2010 at 7:50
ok
as i see you should have problems with read.
If size gets larger than 255, then you can read only the modulo 256 size.
e.g. if size is 260 then you can read the first 4 bytes.
I reanimated the TEST section in the file.cpp and extended the test to a 300
Bytes file. -> now it works.
Original comment by th...@t-online.de
on 13 Sep 2010 at 9:34
Original issue reported on code.google.com by
erezra...@gmail.com
on 13 Sep 2010 at 5:24