mufs: fix off by one in comparison in mufs_extend_tree()

This commit is contained in:
S.J.R. van Schaik 2017-05-29 14:57:34 +02:00
parent ba12823d8b
commit 2401b024a9

View file

@ -100,7 +100,7 @@ int mufs_extend_tree(struct mufs *fs, struct mufs_tree *tree, uint8_t depth)
{
uint32_t root;
for (; tree->depth < depth; ++tree->depth) {
for (; tree->depth <= depth; ++tree->depth) {
if (mufs_alloc_block(fs, &root) < 0)
return -1;