rowingdude / analyzeMFT

MIT License
423 stars 117 forks source link

size unpacking fix #14

Closed Pballen closed 10 years ago

Pballen commented 10 years ago

ssize, alen, and initsize were being read as doubles and gave garbage values. Reading them in as a long long (<Q) also gave garbage values.

Reading them in as unsigned longs with four pad bits (<Lxxxx) seems to work and give expected values. It's strange to me that there are four pad bits, but this is the implementation I found that seems to work. Tested by looking at a few files and it gave correct sizes. It's possible that they should be read in as signed longs (<lxxxx) or ints (<Ixxxx). All three interpretations seemed to give the same values, so it shouldn't matter?

Also made the change for start_vcn and end_vcn, but haven't tested for correctness. It's possible that start_vcn and end_vcn should be unpacked as doubles as before, but it seems unlikely.

dkovar commented 10 years ago

I'll merge this in and will keep an eye out for any unexpected results and other similar fixes being required. Thanks very much.