diff options
author | bapt <bapt@FreeBSD.org> | 2014-07-19 14:10:31 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-07-19 14:10:31 +0000 |
commit | f181a08264b9c279601cde2d442bd92ebc835e69 (patch) | |
tree | e4629e4a6ebe59bbb42334dd96f423101f004af0 | |
parent | b4a43c8a4019a9a5379d49b33c9d5160ac8a74b5 (diff) | |
parent | d6ab565e6df327b5670575cffda778de219257f2 (diff) | |
download | FreeBSD-src-f181a08264b9c279601cde2d442bd92ebc835e69.zip FreeBSD-src-f181a08264b9c279601cde2d442bd92ebc835e69.tar.gz |
Merge libucl 20140718 (fixes a bug in the parser)
-rw-r--r-- | contrib/libucl/src/ucl_parser.c | 5 | ||||
-rw-r--r-- | contrib/libucl/tests/basic/11.in | 3 | ||||
-rw-r--r-- | contrib/libucl/tests/basic/11.res | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/contrib/libucl/src/ucl_parser.c b/contrib/libucl/src/ucl_parser.c index 8768574..e51a54b 100644 --- a/contrib/libucl/src/ucl_parser.c +++ b/contrib/libucl/src/ucl_parser.c @@ -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; diff --git a/contrib/libucl/tests/basic/11.in b/contrib/libucl/tests/basic/11.in new file mode 100644 index 0000000..3131fc7 --- /dev/null +++ b/contrib/libucl/tests/basic/11.in @@ -0,0 +1,3 @@ + + + {"key": "value"} diff --git a/contrib/libucl/tests/basic/11.res b/contrib/libucl/tests/basic/11.res new file mode 100644 index 0000000..4b17c4b --- /dev/null +++ b/contrib/libucl/tests/basic/11.res @@ -0,0 +1,2 @@ +key = "value"; + |