aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-15 22:06:37 +0200
committerDavid Robillard <d@drobilla.net>2020-08-16 13:56:40 +0200
commit53dbd6f360fcca3bac8d5f9f49a4980d3deef10e (patch)
tree1092a202246e16071145c28090b837ba459ccb97 /src
parent6a9db19eb786b51cf1aea232ae7af72b35ac834a (diff)
downloadserd-53dbd6f360fcca3bac8d5f9f49a4980d3deef10e.tar.gz
serd-53dbd6f360fcca3bac8d5f9f49a4980d3deef10e.tar.bz2
serd-53dbd6f360fcca3bac8d5f9f49a4980d3deef10e.zip
Fix handling of bad syntax that ends a collection
Diffstat (limited to 'src')
-rw-r--r--src/n3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index 906a0ac4..2e85ea66 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1193,7 +1193,8 @@ end_collection(SerdReader* reader, ReadContext ctx, Ref n1, Ref n2, SerdStatus s
pop_node(reader, n1);
*ctx.flags &= ~(unsigned)SERD_LIST_CONT;
if (!st) {
- eat_byte_safe(reader, ')');
+ return (eat_byte_check(reader, ')') == ')') ? SERD_SUCCESS
+ : SERD_ERR_BAD_SYNTAX;
}
return st;
}