aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/n3.c')
-rw-r--r--src/n3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/n3.c b/src/n3.c
index 6684fae8..39b00d13 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -97,7 +97,7 @@ read_UCHAR(SerdReader* const reader, const Ref dest, uint32_t* const char_code)
code);
push_bytes(reader, dest, replacement_char, 3);
*char_code = 0xFFFD;
- return SERD_SUCCESS;
+ return reader->strict ? SERD_ERR_BAD_SYNTAX : SERD_SUCCESS;
}
// Build output in buf
@@ -325,7 +325,7 @@ read_string_escape(SerdReader* const reader,
uint32_t code = 0;
if ((st = read_ECHAR(reader, ref, flags)) &&
(st = read_UCHAR(reader, ref, &code))) {
- return r_err(reader, st, "invalid escape '\\%c'\n", peek_byte(reader));
+ return r_err(reader, st, "expected string escape sequence\n");
}
return st;