kaitai-io / kaitai_struct_formats

Kaitai Struct: library of binary file formats (.ksy)
http://formats.kaitai.io
711 stars 204 forks source link

DS_Store - Fix block size computation #637

Closed SkypLabs closed 1 year ago

SkypLabs commented 1 year ago

Hi,

Missing parentheses in the .DS_Store file description cause wrong computation of block sizes.

I was quite surprised to find this bug, as everything worked well when I submitted the file description to the format gallery years ago. I tried to reproduce the setup I used at that time (Kaitai Struct compiler and runtime in version 0.8, etc.), but in vain. Just like if the bug has always been there. Anyway, this PR fixes the issue.

You can find sample files for testing in my original PR (https://github.com/kaitai-io/kaitai_struct_formats/pull/131).

Thanks.