diff options
author | David Robillard <d@drobilla.net> | 2022-08-20 14:58:29 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-10-09 11:20:10 -0400 |
commit | 0f9c1a9bac66878df0f9e12b1d55b38a44b97bf3 (patch) | |
tree | e5832733203f95d5d2ab194369fda1f1dc4ac992 /src | |
parent | 98fdc7a3e012c177f23eeee7de7076339860ca3e (diff) | |
download | zix-0f9c1a9bac66878df0f9e12b1d55b38a44b97bf3.tar.gz zix-0f9c1a9bac66878df0f9e12b1d55b38a44b97bf3.tar.bz2 zix-0f9c1a9bac66878df0f9e12b1d55b38a44b97bf3.zip |
Fix off-by-one error in assertion
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c index f0060c3..0725612 100644 --- a/src/btree.c +++ b/src/btree.c @@ -501,7 +501,7 @@ zix_btree_iter_push(ZixBTreeIter* const ti, ZixBTreeNode* const n, const ZixShort i) { - assert(ti->level < ZIX_BTREE_MAX_HEIGHT); + assert(ti->level < ZIX_BTREE_MAX_HEIGHT - 1); ++ti->level; ti->nodes[ti->level] = n; ti->indexes[ti->level] = (uint16_t)i; |