aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reader.c9
-rw-r--r--tests/test-uri.ttl1
2 files changed, 1 insertions, 9 deletions
diff --git a/src/reader.c b/src/reader.c
index 6d7badbf..468e0f21 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -449,18 +449,11 @@ static inline SerdStatus
read_character(SerdReader reader, Ref dest)
{
const uint8_t c = peek_byte(reader);
+ assert(c != '\\'); // Only called from methods that handle escapes first
switch (c) {
case '\0':
error(reader, "unexpected end of file\n", peek_byte(reader));
return SERD_ERROR;
- case '\\': // 0x5C
- eat_byte(reader, '\\');
- if (read_character_escape(reader, dest)) {
- return SERD_SUCCESS;
- } else {
- error(reader, "invalid escape `\\%c'\n", peek_byte(reader));
- return SERD_ERROR;
- }
default:
if (c < 0x20) { // ASCII control character
error(reader, "unexpected control character\n");
diff --git a/tests/test-uri.ttl b/tests/test-uri.ttl
index d2b4711d..4cae4157 100644
--- a/tests/test-uri.ttl
+++ b/tests/test-uri.ttl
@@ -34,4 +34,3 @@
<http://A#afragment> owl:sameAs <http://A#afragment> .
<?aquery> owl:sameAs <http://a/b/c/d;p?aquery> .
<#afragment> owl:sameAs <http://a/b/c/d;p?q#afragment> .
-