diff options
author | David Robillard <d@drobilla.net> | 2024-03-29 06:55:05 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-03-29 08:39:49 -0400 |
commit | 9facb914c72bf4d0473b49faa797cdb5c9faf68b (patch) | |
tree | b4fe7ec1d0c285cde99cf0a9456539fcb4d719e2 /src | |
parent | dc3aeed6ce84736100d713cac8f40e46d16d1289 (diff) | |
download | serd-9facb914c72bf4d0473b49faa797cdb5c9faf68b.tar.gz serd-9facb914c72bf4d0473b49faa797cdb5c9faf68b.tar.bz2 serd-9facb914c72bf4d0473b49faa797cdb5c9faf68b.zip |
Fix lax NQuads parsing
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1783,13 +1783,17 @@ read_nquads_statement(SerdReader* const reader) SerdStatus read_nquadsDoc(SerdReader* const reader) { - SerdStatus st = SERD_SUCCESS; - - while (!reader->source.eof && !st) { - st = read_nquads_statement(reader); + while (!reader->source.eof) { + const SerdStatus st = read_nquads_statement(reader); + if (st > SERD_FAILURE) { + if (reader->strict) { + return st; + } + serd_reader_skip_until_byte(reader, '\n'); + } } - return st; + return SERD_SUCCESS; } #if defined(__clang__) && __clang_major__ >= 10 |