summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-03 16:53:00 +0000
committerDavid Robillard <d@drobilla.net>2014-11-03 16:53:00 +0000
commit48a7a16305781c3b728abb7086caa425db5f4124 (patch)
tree5bbd3d06009db3d398d7ee07be4c8f2d8958a4bd
parent577ac66a5905f16934892ca3df995b590d06ba34 (diff)
downloadsord-48a7a16305781c3b728abb7086caa425db5f4124.tar.gz
sord-48a7a16305781c3b728abb7086caa425db5f4124.tar.bz2
sord-48a7a16305781c3b728abb7086caa425db5f4124.zip
Fix bugs with stores that contain both graphs and default graph statements.
git-svn-id: http://svn.drobilla.net/sord/trunk@315 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r--NEWS3
-rw-r--r--src/sord.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 95fe8bd..d32ff9e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,10 +2,11 @@ sord (0.13.0) unstable;
* Reduce memory usage and increase performance with a better data structure
* Add sord_erase() for erasing statements via an iterator
+ * Fix bugs with stores that contain both graphs and default graph statements
* This release does not break the ABI, but the semantics of iterators has
changed: any modification to a model invalidates iterators on that model.
- -- David Robillard <d@drobilla.net> Fri, 26 Sep 2014 22:57:41 -0400
+ -- David Robillard <d@drobilla.net> Mon, 03 Nov 2014 11:43:54 -0500
sord (0.12.2) stable;
diff --git a/src/sord.c b/src/sord.c
index 509135f..438f4b0 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -1194,7 +1194,7 @@ sord_add(SordModel* sord, const SordQuad tup)
memcpy(quad, tup, sizeof(SordQuad));
for (unsigned i = 0; i < NUM_ORDERS; ++i) {
- if (sord->indices[i]) {
+ if (sord->indices[i] && (i < GSPO || tup[3])) {
if (!sord_add_to_index(sord, quad, (SordOrder)i)) {
assert(i == 0); // Assuming index coherency
free(quad);