summaryrefslogtreecommitdiff
path: root/btree.pl
diff options
context:
space:
mode:
Diffstat (limited to 'btree.pl')
-rwxr-xr-xbtree.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/btree.pl b/btree.pl
index 04bb168..fb792bf 100755
--- a/btree.pl
+++ b/btree.pl
@@ -73,7 +73,7 @@ sub encode {
my $str = $nodes[$i] =~ s/^([^\x00]*)\x00// && $1;
$ref = writeblock $nodes[$i], 0;
$nodes[$i] = '';
- if($minsize) {
+ if($minsize || $nodes[$i+1]) {
$nodes[$i+1] ||= '';
$nodes[$i+1] .= "$str\x00".eref($ref);
}