]> pd.if.org Git - btree/blobdiff - threadskv4b.c
Fix small bug in main when there is less t han one input file
[btree] / threadskv4b.c
index 8001086796636303a5af2e6e4caac8570d6b3fa8..be9637c2390546193bd94360bb43220d6e99ade8 100644 (file)
@@ -1890,6 +1890,12 @@ BtVal val;
        if( slotptr(set->page, slot)->type == Duplicate )
                len -= BtId;
 
+       //      not there if we reach the stopper key
+
+       if( slot == set->page->cnt )
+         if( !bt_getid (set->page->right) )
+               break;
+
        // if key exists, return >= 0 value bytes copied
        //      otherwise return (-1)