aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-11-11 11:43:52 +0100
committerDavid Robillard <d@drobilla.net>2018-11-11 11:43:52 +0100
commitf17cced47791d6000a76b3094f4ea68cecf0e4d9 (patch)
tree8fa7d86e49515ac2293f43e2b6ce454bd291670c
parent0cecfb2d72a1b8b972e91e9645cca4d6de53e357 (diff)
downloadserd-f17cced47791d6000a76b3094f4ea68cecf0e4d9.tar.gz
serd-f17cced47791d6000a76b3094f4ea68cecf0e4d9.tar.bz2
serd-f17cced47791d6000a76b3094f4ea68cecf0e4d9.zip
Fix missing parse error messages
-rw-r--r--NEWS3
-rw-r--r--src/n3.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index add20be9..a630680e 100644
--- a/NEWS
+++ b/NEWS
@@ -3,8 +3,9 @@ serd (0.30.1) unstable;
* Fix GCC 4 build
* Fix resolving some URIs against base URIs with no trailing slash
* Fix colliding blank nodes when parsing TriG
+ * Fix missing parse error messages
- -- David Robillard <d@drobilla.net> Wed, 03 Oct 2018 15:50:38 +0200
+ -- David Robillard <d@drobilla.net> Sun, 11 Nov 2018 11:42:57 +0100
serd (0.30.0) stable;
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, '.') == '.');