Don't try to parse "0" as an octal number with no digits.

Dumb bug, now fixed and tested for.