Import libucl 20140718 (fixes a bug in the parser)

This commit is contained in:
Baptiste Daroussin 2014-07-19 14:07:49 +00:00
parent f4dd0993e1
commit 8f2b0cccb4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/libucl/dist/; revision=268874
svn path=/vendor/libucl/20140718/; revision=268875; tag=vendor/libucl/20140718
3 changed files with 10 additions and 0 deletions

View File

@ -1661,6 +1661,11 @@ ucl_state_machine (struct ucl_parser *parser)
return false;
}
else {
/* Skip any spaces */
while (p < chunk->end && ucl_test_character (*p,
UCL_CHARACTER_WHITESPACE_UNSAFE)) {
ucl_chunk_skipc (chunk, p);
}
p = chunk->pos;
if (*p == '[') {
parser->state = UCL_STATE_VALUE;

3
tests/basic/11.in Normal file
View File

@ -0,0 +1,3 @@
{"key": "value"}

2
tests/basic/11.res Normal file
View File

@ -0,0 +1,2 @@
key = "value";