cktan / tomlc99

TOML C library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Value of “0000000” isn’t caught as invalid syntax.

FGasper opened this issue · comments

The spec says “Leading zeros are not allowed.” But if I create a file fg.toml:

SSL_DEFAULT_KEY_TYPE='system'
STARTDATE=0000000000

… and feed it to toml_cat, I get:

> ./toml_cat fg.toml
{
  SSL_DEFAULT_KEY_TYPE = "system",
ERROR: unable to decode value in table

Yeah, as it stands today, the parser does not detect value error. It is detected later, after parsing, when the value is retrieved.

That makes sense. I’ll close this.

Incidentally: https://metacpan.org/pod/TOML::XS