ext2fs_extent_insert() only did a memmove if path->left
was > 0, but if we are at the last extent in the node,
path->left == 0, and this node must be moved before the
current extent is replaced with the newly inserted node.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
path->curr = ix;
- if (path->left > 0)
+ if (path->left >= 0)
memmove(ix + 1, ix,
(path->left+1) * sizeof(struct ext3_extent_idx));
path->left++;