diff options
author | David Robillard <d@drobilla.net> | 2017-12-16 11:53:24 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-16 11:53:24 +0100 |
commit | b1212baa6fd2ff00c64a779f6ee2570cf60547b0 (patch) | |
tree | 0b4451ab5772f6edc3a70eb8aa388203166e56a7 | |
parent | adff1ed67fc66221a6c78b4a15b1c581122cbd7c (diff) | |
download | zix-b1212baa6fd2ff00c64a779f6ee2570cf60547b0.tar.gz zix-b1212baa6fd2ff00c64a779f6ee2570cf60547b0.tar.bz2 zix-b1212baa6fd2ff00c64a779f6ee2570cf60547b0.zip |
Add assertions
-rw-r--r-- | zix/btree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zix/btree.c b/zix/btree.c index 89a3e87..78a5a0d 100644 --- a/zix/btree.c +++ b/zix/btree.c @@ -641,6 +641,7 @@ zix_btree_lower_bound(const ZixBTree* const t, } const ZixBTreeIterFrame* const frame = &(*ti)->stack[(*ti)->level]; + assert(frame->node); if (frame->index == frame->node->n_vals) { if (found) { // Found on a previous level but went too far @@ -658,6 +659,7 @@ ZIX_API void* zix_btree_get(const ZixBTreeIter* const ti) { const ZixBTreeIterFrame* const frame = &ti->stack[ti->level]; + assert(frame->node); assert(frame->index < frame->node->n_vals); return frame->node->vals[frame->index]; } |