summaryrefslogtreecommitdiffstats
path: root/src/zix/btree.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-17 15:38:38 +0200
committerDavid Robillard <d@drobilla.net>2020-07-17 15:38:38 +0200
commit616517f44ceeacb26592e50e2bf914aad2d93b90 (patch)
tree658df916f8d4cd79254e40099adde1a39ffb2899 /src/zix/btree.c
parent61d96576f9b74a481139be4296dccf1bb9d6eb1a (diff)
downloadsord-616517f44ceeacb26592e50e2bf914aad2d93b90.tar.gz
sord-616517f44ceeacb26592e50e2bf914aad2d93b90.tar.bz2
sord-616517f44ceeacb26592e50e2bf914aad2d93b90.zip
Fix crash with optimized builds with GCC 10.1.0
Diffstat (limited to 'src/zix/btree.c')
-rw-r--r--src/zix/btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zix/btree.c b/src/zix/btree.c
index 78a5a0d..d830008 100644
--- a/src/zix/btree.c
+++ b/src/zix/btree.c
@@ -689,7 +689,7 @@ zix_btree_begin(const ZixBTree* const t)
ZIX_API bool
zix_btree_iter_is_end(const ZixBTreeIter* const i)
{
- return !i || i->stack[0].node == NULL;
+ return !i || (i->level == 0 && i->stack[0].node == NULL);
}
ZIX_API void