cbor / cbor.github.io

cbor.io web site
74 stars 33 forks source link

cbor.me off by one in comments for negative ints #41

Open g-k opened 6 years ago

g-k commented 6 years ago

For negative ints (major type 1) the diagnostic output is correct, but the comments on the right hand side look wrong. It looks like cbor.me is failing to subtract the -1 implicit in the negative int type.

For example, for hex 0x26 I see a comment of negative(6) and for 0x37 negative(23) (screenshots below).

cborbad6_stripped

cborbad23_stripped

If I'm just misunderstanding the comments then I think some clarifying message on the page would be helpful.