hetelek / Velocity

A cross-platform application built using the Qt framework that allows you to browse and edit Xbox 360 files.
GNU General Public License v3.0
172 stars 50 forks source link

AllocatedBlockCount not calculated and therefore wrong if Value saved wrong #68

Open K4r0qtuYNE5G4qgZ opened 10 years ago

K4r0qtuYNE5G4qgZ commented 10 years ago

The Values saved in Packages are not always thrustworthy, so they should be recalculated.

One of those Values is the AllocatedBlockCount which can also be calculated based on Filesize, if that is not done and the Value saved in Package is wrong eg. too high, Velocity will Crash.

Also a wrong Count automatically causes wrong Tableentry Counts and other wrong Values depending on ho wrong the Value is.

To fix that Issue, the AllocatedBlockCount should be recalculated on load, so that all other Value depending on it are also valid.

Also doing that is easy, i already fixed that in my Delphi Port.

SteffenL commented 9 years ago

If you're willing to share your fixes for XboxInternals, I would like to translate them into C++. I've tried to fix this specific issue myself, but it's mostly guesswork.