aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reader.c b/src/reader.c
index b224979b..f1b445b9 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1599,7 +1599,7 @@ read_statement(SerdReader* reader)
ReadContext ctx = { 0, 0, 0, 0, 0, 0, &flags };
Ref subj = 0;
bool ate_dot = false;
- char s_type = false;
+ char s_type = 0;
bool ret = true;
read_ws_star(reader);
switch (peek_byte(reader)) {
@@ -1641,7 +1641,9 @@ read_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 == '['))) {
+ r_err(reader, SERD_ERR_BAD_SYNTAX, "expected predicate\n");
+ }
} else if (!ate_dot) {
read_ws_star(reader);
ret = (eat_byte_check(reader, '.') == '.');