Deep-Symmetry/crate-digger

Handle even shorter nxs2 cue entries

brunchboy opened this issue · 0 comments

Describe the bug
PCPT2 tags (nxs2 extended cue lists) can have entries short enough to omit comments.

Samples
@evanpurkhiser reported this on the Gitter chat with some samples (headers already stripped off, but length as shown):

[
  '00000000: 7c 00 00 00 01 00 01 00  00 00 e8 03 7b 69 04 00 ||.........è.{i..|',
  '00000010: ff ff ff ff 00 00 00 00  00 00 00 00 00 00 00 00 |ÿÿÿÿ............|',
  '00000020: ff ff ff ff b6 54 00 00  00 00 00 00 54 e4 78 00 |ÿÿÿÿ¶T......Täx.|',
  '00000030: 00 00 00 00 42 00 00 00  00 00 00 00 00 00 00 00 |....B...........|',
  '00000040: 00 00 00 00 00 00 00 00  00 00 2c 00 00 00 15 00 |..........,.....|',
  '00000050: ff 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |ÿ...............|',
  '00000060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|',
  '00000070: 00 00 00 00 00 00 00 00  00 00 00 00             |............    |'
]

[
  '00000000: 8c 00 00 00 02 00 01 00  00 00 e8 03 f5 57 02 00 |..........è.õW..|',
  '00000010: ff ff ff ff 00 00 00 00  00 00 00 00 00 00 00 00 |ÿÿÿÿ............|',
  '00000020: ff ff ff ff ff 2c 00 00  00 00 00 00 b9 0e 40 00 |ÿÿÿÿÿ,......¹.@.|',
  '00000030: 00 00 00 00 54 00 00 00  00 00 00 00 00 00 00 00 |....T...........|',
  '00000040: 00 00 00 00 00 00 00 00  12 00 54 00 6f 00 20 00 |..........T.o. .|',
  '00000050: 48 00 6f 00 74 00 2d 00  41 00 00 00 2c 00 00 00 |H.o.t.-.A...,...|',
  '00000060: 38 b3 00 ff 00 00 00 00  00 00 00 00 00 00 00 00 |8³.ÿ............|',
  '00000070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|',
  '00000080: 00 00 00 00 00 00 00 00  00 00 00 00             |............    |'
]

[
  '00000000: 38 00 00 00 00 00 01 00  00 00 e8 03 3d 04 00 00 |8.........è.=...|',
  '00000010: ff ff ff ff 00 00 00 00  00 00 00 00 00 00 00 00 |ÿÿÿÿ............|',
  '00000020: ff ff 01 00 51 00 00 00  00 00 00 00 e0 58 00 00 |ÿÿ..Q.......àX..|',
  '00000030: 00 00 00 00 00 00 00 00                          |........        |'
]

Expected behavior
We should handle these and just return a nil comment, rather than failing with a parse error.

Additional context
We will want to update the analysis document, and the dbserver version of the code in Beat Link as well.