Holzhaus / rekordcrate

Library for parsing Pioneer Rekordbox device exports
https://holzhaus.github.io/rekordcrate/
Mozilla Public License 2.0
80 stars 12 forks source link

fix(pdb): skip reading rows of invalid pages #93

Closed Swiftb0y closed 2 years ago

Swiftb0y commented 2 years ago

as per doc of pdb::Page::page_flags certain pages contain garbage data and thus should not try to read rowdata.

fixes #72

Swiftb0y commented 2 years ago

This solution just skips the rows but still reads the page (which then contains no rows). Alternatively one could check if the page has no data and then not add it to vector of pages. That solution would be a little more complicated though I fear.

Swiftb0y commented 2 years ago

Couldn't get modular_bitfield to play nice with clippy. Seems like the modular_bitfield codegen must be updated. modular_bitfield has not been updated in almost two years...

Holzhaus commented 2 years ago

Hmm, I think we are using it because it was suggested by the binrw docs. Maybe we need to switch? Maybe the bitflags crate can be used?

If you restore the original PR, I can merge it now to fix the bug and we just put further improvements on the TODO list a.k.a. the issue tracker.

Swiftb0y commented 2 years ago

restored

Swiftb0y commented 2 years ago

Thanks

Holzhaus commented 2 years ago

Thanks for fixing.