diff options
author | David Robillard <d@drobilla.net> | 2017-09-24 17:18:08 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-09-24 19:04:26 +0200 |
commit | 82b207f424549d319a85d2b332da9776588495c9 (patch) | |
tree | a4701c54b7a924c2c7037e9d219f312861bfc4a0 /src/reader.c | |
parent | f34171637b94c204971a2256849491f025862373 (diff) | |
download | serd-82b207f424549d319a85d2b332da9776588495c9.tar.gz serd-82b207f424549d319a85d2b332da9776588495c9.tar.bz2 serd-82b207f424549d319a85d2b332da9776588495c9.zip |
Report error on unexpected object end
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 6 |
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)); |