aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/n3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index d98a516c..37fe995e 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1411,7 +1411,10 @@ read_n3_statement(SerdReader* reader)
} else if (!subj) {
ret = r_err(reader, SERD_ERR_BAD_SYNTAX, "bad subject\n");
} else if (!read_triples(reader, ctx, &ate_dot)) {
- ret = (s_type == '[');
+ if (!(ret = (s_type == '[')) && ate_dot) {
+ ret = r_err(reader, SERD_ERR_BAD_SYNTAX,
+ "unexpected end of statement\n");
+ }
} else if (!ate_dot) {
read_ws_star(reader);
ret = (eat_byte_check(reader, '.') == '.');