summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-12 12:36:51 +0100
committerDavid Robillard <d@drobilla.net>2021-01-12 12:36:51 +0100
commit08991af7b742a62a64ecb429662659a5a0a6ebc6 (patch)
tree85dcf40a82eb02dd30800d993c0e7bcab1c82f25
parent41a39932e4b1df18a388cc1cd98ee43b06b98b59 (diff)
downloadzix-08991af7b742a62a64ecb429662659a5a0a6ebc6.tar.gz
zix-08991af7b742a62a64ecb429662659a5a0a6ebc6.tar.bz2
zix-08991af7b742a62a64ecb429662659a5a0a6ebc6.zip
Fix crash with optimized builds with GCC 10.1.0
-rw-r--r--src/btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index 7d07b87..7926a56 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -866,7 +866,7 @@ zix_btree_iter_copy(const ZixBTreeIter* const i)
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);
}
bool