commit | fbd8d773ad0230ffba4e2c296dac3edcac9ca27e | [log] [tgz] |
---|---|---|
author | Jason Evans <je@fb.com> | Wed Mar 11 23:14:50 2015 -0700 |
committer | Jason Evans <je@fb.com> | Wed Mar 11 23:14:50 2015 -0700 |
tree | b63a669ab15d451997e392b8ec741172c01841aa | |
parent | bc45d41d23bac598dbd38e5aac5a85b43d24bc04 [diff] [blame] |
Fix unsigned comparison underflow. These bugs only affected tests and debug builds.
diff --git a/src/rtree.c b/src/rtree.c index 47d9084..af0d97e 100644 --- a/src/rtree.c +++ b/src/rtree.c
@@ -63,7 +63,7 @@ rtree_delete_subtree(rtree_t *rtree, rtree_node_elm_t *node, unsigned level) { - if (level < rtree->height - 1) { + if (level + 1 < rtree->height) { size_t nchildren, i; nchildren = ZU(1) << rtree->levels[level].bits;