diff options
author | David Robillard <d@drobilla.net> | 2011-01-25 16:30:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-25 16:30:50 +0000 |
commit | 03e48f15a3635cfef0392b87e6ad7b7702ba2bcb (patch) | |
tree | b6cd8af5e445f341486cc810e8ca42cb92fabadb /src/reader.c | |
parent | da60fb781d5fcd4d0b3852cf9586d4f6ebed7dd9 (diff) | |
download | serd-03e48f15a3635cfef0392b87e6ad7b7702ba2bcb.tar.gz serd-03e48f15a3635cfef0392b87e6ad7b7702ba2bcb.tar.bz2 serd-03e48f15a3635cfef0392b87e6ad7b7702ba2bcb.zip |
Fix handling of EOF in collections.
git-svn-id: http://svn.drobilla.net/serd/trunk@65 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reader.c b/src/reader.c index fb539819..04891658 100644 --- a/src/reader.c +++ b/src/reader.c @@ -1030,7 +1030,7 @@ inline static bool is_object_end(const uint8_t c) { switch (c) { - case 0x9: case 0xA: case 0xD: case 0x20: + case 0x9: case 0xA: case 0xD: case 0x20: case '\0': case '#': case '.': case ';': return true; default: @@ -1053,6 +1053,7 @@ read_object(SerdReader reader, ReadContext ctx) Node o = INTERNAL_NODE_NULL; const uint8_t c = peek_byte(reader); switch (c) { + case '\0': case ')': return false; case '[': case '(': @@ -1205,7 +1206,6 @@ read_collection(SerdReader reader, ReadContext ctx, Node* dest) ctx.subject = dest; ctx.predicate = &reader->rdf_first; if (!read_object(reader, ctx)) { - pop_string(reader, dest->value); return error(reader, "unexpected end of collection\n"); } |