|
From: Roger H. <rog...@mi...> - 2004-08-06 17:15:20
|
I think I have traced the problem with my bio-degradable 3DMF. if e3fformat_3dmf_bin_read_toc if gets the logical end of file from the file manager. It gets the size of the table of contents from the size recorded in the file. It the recalculates the size of the table of contents (presumably it is a different size in its internal representation or some such). It then subtracts the NEWLY CALCULATED size of the T.O.C. from the logical end of file. This means the value of 'end of file' is actually well before the TOC, before the end of the useful data. Subsequently the routines which read the objects from the file give up prematurely because they think they are reading over the end of the file! I find it amazing that nobody (including me) has noticed this before. I propose to save the size of TOC read from the file in a separate local variable and subtract this from the end of file rather than the recalculated value. Unless someone objects by Monday, I'll check in a fix. Roger. |