aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-09-04 20:30:31 +0000
committerDavid Robillard <d@drobilla.net>2015-09-04 20:30:31 +0000
commitecb322d8e5d751c6b2a17fd7df0cbfa200e2cf64 (patch)
treeff528d2f3e0bf0f4859b7a0f33d402363d119ffc /src
parent4976746ca753f736dbf3c5f9f019d134d139b284 (diff)
downloadserd-ecb322d8e5d751c6b2a17fd7df0cbfa200e2cf64.tar.gz
serd-ecb322d8e5d751c6b2a17fd7df0cbfa200e2cf64.tar.bz2
serd-ecb322d8e5d751c6b2a17fd7df0cbfa200e2cf64.zip
Fix clash resolution when a blank node ID prefix is set.
git-svn-id: http://svn.drobilla.net/serd/trunk@490 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src')
-rw-r--r--src/reader.c9
1 files changed, 5 insertions, 4 deletions
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);