logoalt Hacker News

willtemperleytoday at 4:00 PM1 replyview on HN

So why does the spec allow it? Like a good engineer I read the spec and tested against the over-wide example encodings given.


Replies

Chaosvextoday at 4:09 PM

Because it's not a real standard and there is no blessed RFC for it. The DWARF spec is as close as you'll get and it says, "The integer zero is a special case, consisting of a single zero byte." So in a way, it doesn't.

Either way, a properly written decoder (and it's like ten lines) should really not have any problems with it. I was agreeing with you.

Edit: to clarify, I was talking about the author's argument being strange, not yours.

show 1 reply