aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-09-24 17:18:08 +0200
committerDavid Robillard <d@drobilla.net>2017-09-24 19:04:26 +0200
commit82b207f424549d319a85d2b332da9776588495c9 (patch)
treea4701c54b7a924c2c7037e9d219f312861bfc4a0
parentf34171637b94c204971a2256849491f025862373 (diff)
downloadserd-82b207f424549d319a85d2b332da9776588495c9.tar.gz
serd-82b207f424549d319a85d2b332da9776588495c9.tar.bz2
serd-82b207f424549d319a85d2b332da9776588495c9.zip
Report error on unexpected object end
-rw-r--r--src/reader.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/reader.c b/src/reader.c
index 788d0a74..f106c87c 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1225,10 +1225,8 @@ read_object(SerdReader* reader, ReadContext* ctx, bool emit, bool* ate_dot)
}
}
switch (c) {
- case '\0':
- return r_err(reader, SERD_ERR_BAD_SYNTAX, "end of file in object\n");
- case ')':
- return false;
+ case '\0': case ')':
+ return r_err(reader, SERD_ERR_BAD_SYNTAX, "expected object\n");
case '[':
simple = false;
TRY_THROW(ret = read_anon(reader, *ctx, false, &o));