support SPC separator in timestamp

This commit is contained in:
CK Tan 2019-03-06 11:44:14 -08:00
parent c4325a38fb
commit bd76f1276e
1 changed files with 2 additions and 1 deletions

3
toml.c
View File

@ -1701,7 +1701,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
*ret->year = val;
if (*p) {
if (*p != 'T') return -1;
// parse the T or space separator
if (*p != 'T' && *p != ' ') return -1;
p++;
}
}