aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-07-19 14:07:49 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-07-19 14:07:49 +0000
commit8f2b0cccb4a7a7fe296db2f59cb6cdbfbec9291b (patch)
tree2d30d9860415c33fb496243bf23a10c2a287c09b
parentf4dd0993e1caedccd8cc6a4fe8a82bd185cafb0b (diff)
downloadsrc-8f2b0cccb4a7a7fe296db2f59cb6cdbfbec9291b.tar.gz
src-8f2b0cccb4a7a7fe296db2f59cb6cdbfbec9291b.zip
Import libucl 20140718 (fixes a bug in the parser)vendor/libucl/20140718
Notes
Notes: svn path=/vendor/libucl/dist/; revision=268874 svn path=/vendor/libucl/20140718/; revision=268875; tag=vendor/libucl/20140718
-rw-r--r--src/ucl_parser.c5
-rw-r--r--tests/basic/11.in3
-rw-r--r--tests/basic/11.res2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/ucl_parser.c b/src/ucl_parser.c
index 87685744716e..e51a54b77bc6 100644
--- a/src/ucl_parser.c
+++ b/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/tests/basic/11.in b/tests/basic/11.in
new file mode 100644
index 000000000000..3131fc7e1547
--- /dev/null
+++ b/tests/basic/11.in
@@ -0,0 +1,3 @@
+
+
+ {"key": "value"}
diff --git a/tests/basic/11.res b/tests/basic/11.res
new file mode 100644
index 000000000000..4b17c4b4eb1b
--- /dev/null
+++ b/tests/basic/11.res
@@ -0,0 +1,2 @@
+key = "value";
+