Merge pull request #3 from m4ng0squ4sh/master

Fixes #1
This commit is contained in:
Keiji Yoshida 2014-12-18 09:28:10 +09:00
commit 59a860988b

View file

@ -60,6 +60,10 @@ func reap(db *bolt.DB, options Options, quitC <-chan struct{}, doneC chan<- stru
}
if options.BatchSize == i {
// Store the current key to the previous key.
// Copy the byte slice key, because this data is
// not safe outside of this transaction.
prevKey = make([]byte, len(k))
copy(prevKey, k)
return nil
}