aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/reader.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 84eb68ef..46dc90df 100644
--- a/NEWS
+++ b/NEWS
@@ -5,12 +5,13 @@ serd (0.21.1) unstable;
* Add serd_reader_set_strict() and -l (lax) option to serdi to tolerate
parsing URIs with escaped characters
* Fix reading statements ending with a blank then dot with no space
+ * Fix clash resolution when a blank node ID prefix is set
* Fix serializing fractional decimals that would round up
* Add support for Turtle named inline nodes extension
* Report errors for invalid IRI characters and missing terminators
* Fix warnings when building with ISO C++ compilers
- -- David Robillard <d@drobilla.net> Sat, 04 Apr 2015 16:22:17 -0400
+ -- David Robillard <d@drobilla.net> Fri, 04 Sep 2015 16:27:23 -0400
serd (0.20.0) stable;
diff --git a/src/reader.c b/src/reader.c
index 012dcb43..ec1a6034 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1035,11 +1035,12 @@ read_BLANK_NODE_LABEL(SerdReader* reader, bool* ate_dot)
}
if (reader->syntax == SERD_TURTLE) {
- if (is_digit(n->buf[1])) {
- if (n->buf[0] == 'b') {
- ((char*)n->buf)[0] = 'B'; // Prevent clash
+ if (is_digit(n->buf[reader->bprefix_len + 1])) {
+ if ((n->buf[reader->bprefix_len]) == 'b') {
+ ((char*)n->buf)[reader->bprefix_len] = 'B'; // Prevent clash
reader->seen_genid = true;
- } else if (reader->seen_genid && n->buf[0] == 'B') {
+ } else if (reader->seen_genid &&
+ n->buf[reader->bprefix_len] == 'B') {
r_err(reader, SERD_ERR_ID_CLASH,
"found both `b' and `B' blank IDs, prefix required\n");
return pop_node(reader, ref);