ckruse / CFPropertyList

Read, write and manipulate both binary and XML property lists as defined by apple
MIT License
212 stars 47 forks source link

24-bit offset table unpack specifier does not work on Ruby 1.8.7 #18

Closed rgov closed 11 years ago

rgov commented 11 years ago

CFPropertyList::Binary.load will attempt to decode an offset table of 24-bit entries by first unpacking a big-endian hex string for every 3 bytes, and then parsing the hex string to an integer.

However, on ruby 1.8.7, the unpack specifier "(H6)" does not appear to work as intended. The result is that only one entry from the offset table is correctly unpacked. The Ruby documentation does not seem to permit parentheses in the specifier ("H6" doesn't work either).

ckruse commented 11 years ago

Oh, nice one. Thanks!